~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/qnx6/qnx6.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * QNX6 file system, Linux implementation.
  4  *
  5  * Version : 1.0.0
  6  *
  7  * History :
  8  *
  9  * 01-02-2012 by Kai Bankett (chaosman@ontika.net) : first release.
 10  * 16-02-2012 page map extension by Al Viro
 11  *
 12  */
 13 
 14 #ifdef pr_fmt
 15 #undef pr_fmt
 16 #endif
 17 
 18 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 19 
 20 #include <linux/fs.h>
 21 #include <linux/pagemap.h>
 22 
 23 typedef __u16 __bitwise __fs16;
 24 typedef __u32 __bitwise __fs32;
 25 typedef __u64 __bitwise __fs64;
 26 
 27 #include <linux/qnx6_fs.h>
 28 
 29 struct qnx6_sb_info {
 30         struct buffer_head      *sb_buf;        /* superblock buffer */
 31         struct qnx6_super_block *sb;            /* our superblock */
 32         int                     s_blks_off;     /* blkoffset fs-startpoint */
 33         int                     s_ptrbits;      /* indirect pointer bitfield */
 34         unsigned long           s_mount_opt;    /* all mount options */
 35         int                     s_bytesex;      /* holds endianess info */
 36         struct inode *          inodes;
 37         struct inode *          longfile;
 38 };
 39 
 40 struct qnx6_inode_info {
 41         __fs32                  di_block_ptr[QNX6_NO_DIRECT_POINTERS];
 42         __u8                    di_filelevels;
 43         __u32                   i_dir_start_lookup;
 44         struct inode            vfs_inode;
 45 };
 46 
 47 extern struct inode *qnx6_iget(struct super_block *sb, unsigned ino);
 48 extern struct dentry *qnx6_lookup(struct inode *dir, struct dentry *dentry,
 49                                         unsigned int flags);
 50 
 51 #ifdef CONFIG_QNX6FS_DEBUG
 52 extern void qnx6_superblock_debug(struct qnx6_super_block *,
 53                                                 struct super_block *);
 54 #endif
 55 
 56 extern const struct inode_operations qnx6_dir_inode_operations;
 57 extern const struct file_operations qnx6_dir_operations;
 58 
 59 static inline struct qnx6_sb_info *QNX6_SB(struct super_block *sb)
 60 {
 61         return sb->s_fs_info;
 62 }
 63 
 64 static inline struct qnx6_inode_info *QNX6_I(struct inode *inode)
 65 {
 66         return container_of(inode, struct qnx6_inode_info, vfs_inode);
 67 }
 68 
 69 #define clear_opt(o, opt)               (o &= ~(QNX6_MOUNT_##opt))
 70 #define set_opt(o, opt)                 (o |= (QNX6_MOUNT_##opt))
 71 #define test_opt(sb, opt)               (QNX6_SB(sb)->s_mount_opt & \
 72                                          QNX6_MOUNT_##opt)
 73 enum {
 74         BYTESEX_LE,
 75         BYTESEX_BE,
 76 };
 77 
 78 static inline __u64 fs64_to_cpu(struct qnx6_sb_info *sbi, __fs64 n)
 79 {
 80         if (sbi->s_bytesex == BYTESEX_LE)
 81                 return le64_to_cpu((__force __le64)n);
 82         else
 83                 return be64_to_cpu((__force __be64)n);
 84 }
 85 
 86 static inline __fs64 cpu_to_fs64(struct qnx6_sb_info *sbi, __u64 n)
 87 {
 88         if (sbi->s_bytesex == BYTESEX_LE)
 89                 return (__force __fs64)cpu_to_le64(n);
 90         else
 91                 return (__force __fs64)cpu_to_be64(n);
 92 }
 93 
 94 static inline __u32 fs32_to_cpu(struct qnx6_sb_info *sbi, __fs32 n)
 95 {
 96         if (sbi->s_bytesex == BYTESEX_LE)
 97                 return le32_to_cpu((__force __le32)n);
 98         else
 99                 return be32_to_cpu((__force __be32)n);
100 }
101 
102 static inline __fs32 cpu_to_fs32(struct qnx6_sb_info *sbi, __u32 n)
103 {
104         if (sbi->s_bytesex == BYTESEX_LE)
105                 return (__force __fs32)cpu_to_le32(n);
106         else
107                 return (__force __fs32)cpu_to_be32(n);
108 }
109 
110 static inline __u16 fs16_to_cpu(struct qnx6_sb_info *sbi, __fs16 n)
111 {
112         if (sbi->s_bytesex == BYTESEX_LE)
113                 return le16_to_cpu((__force __le16)n);
114         else
115                 return be16_to_cpu((__force __be16)n);
116 }
117 
118 static inline __fs16 cpu_to_fs16(struct qnx6_sb_info *sbi, __u16 n)
119 {
120         if (sbi->s_bytesex == BYTESEX_LE)
121                 return (__force __fs16)cpu_to_le16(n);
122         else
123                 return (__force __fs16)cpu_to_be16(n);
124 }
125 
126 extern struct qnx6_super_block *qnx6_mmi_fill_super(struct super_block *s,
127                                                     int silent);
128 
129 static inline void qnx6_put_page(struct page *page)
130 {
131         kunmap(page);
132         put_page(page);
133 }
134 
135 extern unsigned qnx6_find_entry(int len, struct inode *dir, const char *name,
136                                 struct page **res_page);
137 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php