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

TOMOYO Linux Cross Reference
Linux/fs/freevxfs/vxfs_inode.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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-only */
  2 /*
  3  * Copyright (c) 2000-2001 Christoph Hellwig.
  4  * Copyright (c) 2016 Krzysztof Blaszkowski
  5  */
  6 #ifndef _VXFS_INODE_H_
  7 #define _VXFS_INODE_H_
  8 
  9 /*
 10  * Veritas filesystem driver - inode structure.
 11  *
 12  * This file contains the definition of the disk and core
 13  * inodes of the Veritas Filesystem.
 14  */
 15 
 16 
 17 #define VXFS_ISIZE              0x100           /* Inode size */
 18 
 19 #define VXFS_NDADDR             10              /* Number of direct addrs in inode */
 20 #define VXFS_NIADDR             2               /* Number of indirect addrs in inode */
 21 #define VXFS_NIMMED             96              /* Size of immediate data in inode */
 22 #define VXFS_NTYPED             6               /* Num of typed extents */
 23 
 24 #define VXFS_TYPED_OFFSETMASK   (0x00FFFFFFFFFFFFFFULL)
 25 #define VXFS_TYPED_TYPEMASK     (0xFF00000000000000ULL)
 26 #define VXFS_TYPED_TYPESHIFT    56
 27 
 28 #define VXFS_TYPED_PER_BLOCK(sbp) \
 29         ((sbp)->s_blocksize / sizeof(struct vxfs_typed))
 30 
 31 /*
 32  * Possible extent descriptor types for %VXFS_ORG_TYPED extents.
 33  */
 34 enum {
 35         VXFS_TYPED_INDIRECT             = 1,
 36         VXFS_TYPED_DATA                 = 2,
 37         VXFS_TYPED_INDIRECT_DEV4        = 3,
 38         VXFS_TYPED_DATA_DEV4            = 4,
 39 };
 40 
 41 /*
 42  * Data stored immediately in the inode.
 43  */
 44 struct vxfs_immed {
 45         __u8                    vi_immed[VXFS_NIMMED];
 46 };
 47 
 48 struct vxfs_ext4 {
 49         __fs32                  ve4_spare;              /* ?? */
 50         __fs32                  ve4_indsize;            /* Indirect extent size */
 51         __fs32                  ve4_indir[VXFS_NIADDR]; /* Indirect extents */
 52         struct direct {                                 /* Direct extents */
 53                 __fs32          extent;                 /* Extent number */
 54                 __fs32          size;                   /* Size of extent */
 55         } ve4_direct[VXFS_NDADDR];
 56 };
 57 
 58 struct vxfs_typed {
 59         __fs64          vt_hdr;         /* Header, 0xTTOOOOOOOOOOOOOO; T=type,O=offs */
 60         __fs32          vt_block;       /* Extent block */
 61         __fs32          vt_size;        /* Size in blocks */
 62 };
 63 
 64 struct vxfs_typed_dev4 {
 65         __fs64          vd4_hdr;        /* Header, 0xTTOOOOOOOOOOOOOO; T=type,O=offs */
 66         __fs64          vd4_block;      /* Extent block */
 67         __fs64          vd4_size;       /* Size in blocks */
 68         __fs32          vd4_dev;        /* Device ID */
 69         __u8            __pad1;
 70 };
 71 
 72 /*
 73  * The inode as contained on the physical device.
 74  */
 75 struct vxfs_dinode {
 76         __fs32          vdi_mode;
 77         __fs32          vdi_nlink;      /* Link count */
 78         __fs32          vdi_uid;        /* UID */
 79         __fs32          vdi_gid;        /* GID */
 80         __fs64          vdi_size;       /* Inode size in bytes */
 81         __fs32          vdi_atime;      /* Last time accessed - sec */
 82         __fs32          vdi_autime;     /* Last time accessed - usec */
 83         __fs32          vdi_mtime;      /* Last modify time - sec */
 84         __fs32          vdi_mutime;     /* Last modify time - usec */
 85         __fs32          vdi_ctime;      /* Create time - sec */
 86         __fs32          vdi_cutime;     /* Create time - usec */
 87         __u8            vdi_aflags;     /* Allocation flags */
 88         __u8            vdi_orgtype;    /* Organisation type */
 89         __fs16          vdi_eopflags;
 90         __fs32          vdi_eopdata;
 91         union {
 92                 __fs32                  rdev;
 93                 __fs32                  dotdot;
 94                 struct {
 95                         __u32           reserved;
 96                         __fs32          fixextsize;
 97                 } i_regular;
 98                 struct {
 99                         __fs32          matchino;
100                         __fs32          fsetindex;
101                 } i_vxspec;
102                 __u64                   align;
103         } vdi_ftarea;
104         __fs32          vdi_blocks;     /* How much blocks does inode occupy */
105         __fs32          vdi_gen;        /* Inode generation */
106         __fs64          vdi_version;    /* Version */
107         union {
108                 struct vxfs_immed       immed;
109                 struct vxfs_ext4        ext4;
110                 struct vxfs_typed       typed[VXFS_NTYPED];
111         } vdi_org;
112         __fs32          vdi_iattrino;
113 };
114 
115 #define vdi_rdev        vdi_ftarea.rdev
116 #define vdi_dotdot      vdi_ftarea.dotdot
117 #define vdi_fixextsize  vdi_ftarea.regular.fixextsize
118 #define vdi_matchino    vdi_ftarea.vxspec.matchino
119 #define vdi_fsetindex   vdi_ftarea.vxspec.fsetindex
120 
121 #define vdi_immed       vdi_org.immed
122 #define vdi_ext4        vdi_org.ext4
123 #define vdi_typed       vdi_org.typed
124 
125 
126 /*
127  * The inode as represented in the main memory.
128  */
129 struct vxfs_inode_info {
130         struct inode    vfs_inode;
131 
132         __u32           vii_mode;
133         __u32           vii_nlink;      /* Link count */
134         __u32           vii_uid;        /* UID */
135         __u32           vii_gid;        /* GID */
136         __u64           vii_size;       /* Inode size in bytes */
137         __u32           vii_atime;      /* Last time accessed - sec */
138         __u32           vii_autime;     /* Last time accessed - usec */
139         __u32           vii_mtime;      /* Last modify time - sec */
140         __u32           vii_mutime;     /* Last modify time - usec */
141         __u32           vii_ctime;      /* Create time - sec */
142         __u32           vii_cutime;     /* Create time - usec */
143         __u8            vii_orgtype;    /* Organisation type */
144         union {
145                 __u32                   rdev;
146                 __u32                   dotdot;
147         } vii_ftarea;
148         __u32           vii_blocks;     /* How much blocks does inode occupy */
149         __u32           vii_gen;        /* Inode generation */
150         union {
151                 struct vxfs_immed       immed;
152                 struct vxfs_ext4        ext4;
153                 struct vxfs_typed       typed[VXFS_NTYPED];
154         } vii_org;
155 };
156 
157 #define vii_rdev        vii_ftarea.rdev
158 #define vii_dotdot      vii_ftarea.dotdot
159 
160 #define vii_immed       vii_org.immed
161 #define vii_ext4        vii_org.ext4
162 #define vii_typed       vii_org.typed
163 
164 static inline struct vxfs_inode_info *VXFS_INO(struct inode *inode)
165 {
166         return container_of(inode, struct vxfs_inode_info, vfs_inode);
167 }
168 
169 #endif /* _VXFS_INODE_H_ */
170 

~ [ 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