inode (vxfs) - format of a VERITAS File System inode
Although a vxfs inode is typically 256 bytes in
length, an inode size of 512 bytes can be used instead. The inode size
can be set when the file system is made
An inode entry has the following format:
For the IORG_TYPED organization type, the following structure is used:
- The mode and type of file.
- The number of links to the file.
- The inode owner.
- The inode group.
- The size in bytes of the file. Eight bytes have been allocated. Only four bytes are used in the current
- Time of last access, in timestruc_t format.
- Time of last modification, in timestruc_t format.
- Time of last inode change, in timestruc_t format.
- These flags are used to control the allocation and extension of files.
- If this flag is set, the inode is invalid in some way. It should be cleared when fsck is run
- If this flag is set, the file may not be extended once the current reservation is exceeded. The
reservation may be increased by the VX_SETEXT ioctl, but the file will not be
- If this flag is set, the file may not be extended once the current
reservation is exceeded. It should be cleared on truncation or when
is run. This flag is usually set because an
I/O error occurs while extending a file.
- If this flag is set, the file must be allocated in extents of a fixed size and alignment. If an
extent of i_fixextsize blocks aligned on an i_fixextsize boundary can't be found,
then the allocation will fail. The alignment is relative to the beginning of the
- Mapping type. Indicates how the inode mapping area is to be interpreted. Currently there are two
mapping types supported:
- Mapping area is unused. IORG_NONE is used for files that have no associated data
storage. Since there is no need for either extents or immediate data, the mapping
area is unused. Block and character special files are an example of files that use
the IORG_NONE organization type.
- Mapping area consists of an array of 32-bit extent block addresses and sizes.
- Mapping area itself is a data block. This mapping is referred to as Immediate Inode Data.
- Mapping area consists of type-extent structures.
- Extended inode operation flag area.
- Extended inode operation data area.
- This is a union. The contents are determined by file type.
- For devices, the following field is supported:
- The device number of a block or character special device.
- For directories, the following field is supported:
- The parent directory inode inumber if the inode is a directory. This replaces the standard
``..'' entry in the first directory block. The vxfs file system does not have explicit
``.'' and ``..'' entries.
- For regular files, the following fields are supported:
- The number of data blocks reserved for exclusive use by the file
(preallocation). A preallocation may be requested using ioctl.
- Set when the inode has a fixed extent size. The default is to have
a variable extent size allocation policy. A fixed extent size may be
specified using ioctl.
- For structural files, the following fields are supported:
- (Version 2 layout and later only.) The inode number of the ``matching'' inode. For
replicated files, this is the inode of the replica. For extent map reorganization files,
this is the inode of the file being reorganized.
- (Version 2 layout and later only.) The index of the fileset associated with this inode.
- The number of blocks currently allocated to the file, including any blocks allocated for indirect
- The generation number. A serial number which is incremented whenever the inode is freed and
reallocated. It is designed to provide a ``handle'' for stateless servers such as NFS.
- A count of the number of times the inode metadata has been modified. This field is a 64-bit number.
- The mapping area. This field is a union based on the value of i_orgtype and the file system type.
- For the vxfs IORG_IMMED organization type, the following structure is used:
- The immediate inode data area, NIMMED_N (currently 96) bytes in length (see
fs_immedlen). Any directory or symbolic link which is <= 96 bytes in length will
be stored directly in the inode.
- For the vxfs IORG_EXT4 organization type, the following structure is used:
- Four bytes of padding, not used.
- Indirect extent size. This is the size in blocks of the indirect data extents in the file.
- Array of indirect address extents. There are NIADDR indirect address extents. The indirect
address extents are 8192 bytes long. Each indirect address extent may contain up
to 2048 extent addresses.
- The first indirect address extent is used for single indirection. With single indirection, each
entry in the indirect address extent indicates the starting block number of a data
- The second indirect address extent is a double indirect address extent. With double
indirection, each entry in the indirect address extent indicates the starting block
number of a single indirect address extent.
- An array of structures containing the direct extent addresses and sizes. Up to NDADDR_N
direct extents are supported. Since a variable length extent allocation policy is
used, each direct extent may have a different size. Each structure contains the
- i_de Direct extent address.
- i_des Direct extent size.
The attribute records in the inode are terminated by a record with a format of zero (for compatibility with file systems that have the last 80 bytes of all inodes set to NULL).
- (Version 1 layout only.) Bytes 176 to the end of the inode are empty and reserved.
- (Version 2 layout and later only.) Indirect attribute inode. This identifies the inode in the attribute
fileset that contains indirect attribute references.
- The remaining bytes of the inode are reserved for extended attribute records, which are formatted as
- The exact length of the attribute record. If this is not a multiple of 4 bytes, the start of the
next attribute record is found by rounding the length up to a 4 byte boundary.
- The format of the data layout of the remainder of the attribute record. Each attribute
consists of a class identifying the attribute's administrative domain; a subclass
identifying the attribute within the administrative domain; and data. The valid
record formats are:
- This record extends the immediate data area so that files larger than 96 bytes can be stored directly in the inode.
- The attribute is stored directly in the inode. The fields in the rest of this record are:
- The class of the attribute.
- The subclass of the attribute.
- The attribute data.
- When attributes are too large to store directly in the inode, each attribute is stored in its own file. This record lists each attribute along with the inode number corresponding to the file in which the attribute is stored. The number of entries in the list is determined by the length of the record. The fields in each entry are:
- The class of the attribute.
- The subclass of the attribute.
- The length of the attribute data. This allows attribute operations to check
the length of an attribute without reading the attribute inode.
- The inode number of the file containing the attribute data. The inode is
part of the attribute fileset.
© 1997 The Santa Cruz Operation, Inc. All rights reserved.