Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation   
Manual: Devices (4)   

inode_vxfs

NAME

inode_vxfs - format of a VxFS file system inode

SYNOPSIS


#include <sys/types.h>
#include <sys/fs/vx_inode.h>

AVAILABILITY

VRTSvxfs

DESCRIPTION

A VxFS inode is typically 256 bytes in length, but an inode can also be 512 bytes. You specify the inode size with mkfs.

An inode entry has the following format:

i_mode

The mode and type of file.

i_nlink

The number of links to the file.

i_uid

The inode owner.

i_gid

The inode group.

i_size

The size in bytes of the file. Eight bytes are allocated.

i_atime

Time of last access, in struct timeval format.

i_mtime

Time of last modification, in struct timeval format.

i_ctime

Time of last inode change, in struct timeval format.

i_aflags

These flags control the allocation and extension of files:

VX_AF_IBAD

If set, the inode is invalid. Cleared when fsck is run.

VX_AF_NOEXTEND

If set, the file cannot be extended after the current reservation is exceeded. The reservation can be increased by the VX_SETEXT ioctl, but the file is not automatically extended.

VX_AF_NOGROW

If set, the file cannot be extended after the current reservation is exceeded. This flag is typically set because an I/O error occurred while extending a file. Cleared on truncation or when setext is run.

VX_AF_ALIGN

If 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 cannot be found, then the allocation fails. The alignment is relative to the beginning of the allocation unit.

i_orgtype

Mapping type. Indicates how to interpret the inode mapping area. Currently there are four supported mapping types:

IORG_NONE

Mapping area is unused. IORG_NONE is used for files that have no associated data storage. Because there is no need for either extents or immediate data, the mapping area is unused. Block and character special files, for example, use this organization type.

IORG_EXT4

Mapping area consists of an array of 32-bit extent block addresses and sizes.

IORG_IMMED

Mapping area itself is a data block. This mapping is referred to as Immediate Inode Data.

IORG_TYPED

Mapping area consists of typed-extent structures.

i_eopflags

Extended inode operation flag area.

i_eopdata

Extended inode operation data area.

i_ftarea

This field is a union. The contents are determined by file type. For devices, the following field is supported:

i_rdev

The device number of a block or character special device.

For directories, the following field is supported:

i_dotdot

The parent directory inode inumber if the inode is a directory. This replaces the standard ''..'' (dot dot) entry in the first directory block. VxFS does not have explicit ''.'' (dot ) and ''..'' (dot dot) entries.

For regular files, the following fields are supported:

i_reserve

The number of data blocks reserved for exclusive use by the file (preallocation). A preallocation can be requested using an ioctl. See vxfsio(7).

i_fixextsize

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. See vxfsio(7).

For structural files, the following fields are supported:

i_matchino

(Version 2 and later disk layouts 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.

i_fsetindex

(Version 2 and later disk layouts only.) The index of the fileset associated with the inode.

i_blocks

The number of blocks allocated to the file, including the blocks allocated for indirect address extents.

i_gen

The generation number. A serial number which increments whenever the inode is freed and reallocated. This provides a ''handle'' for stateless servers such as NFS.

i_vversion

The number of times the inode metadata is modified. This field is a 64-bit number.

ic_org

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:

i_immed

The immediate inode data area, NIMMED_N (currently 96) bytes in length (see fs_immedlen). Any directory or symbolic link which is less than or equal to 96 bytes in length is stored directly in the inode.

For the VxFS IORG_EXT4 organization type, the following structure is used:

i_ies

Indirect extent size. The size, in blocks, of the indirect data extents in the file.

i_ie

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 for single indirection. With single indirection, each entry in the indirect address extent indicates the starting block number of a data extent.

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.

i_dext

An array of structures containing the direct extent addresses and sizes. Up to NDADDR_N direct extents are supported. Because there is a variable length extent allocation policy, each direct extent can have a different size. Each structure contains the following elements:

i_de

Direct extent address.

i_des

Direct extent size.

i_iattrino

(Version 2 and later disk layouts.) Indirect attribute inode. Identifies the inode in the attribute fileset that contains indirect attribute references.

The remaining bytes of the inode are reserved for extended attribute records. Their format is:

length

The 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.

format

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:

ATTR_EXTIMMED

Extends the immediate data area so that files larger than 96 bytes can be stored directly in the inode.

ATTR_IMMED

The attribute is stored directly in the inode. The fields in the rest of this record are:

class

The class of the attribute.

subclass

The subclass of the attribute.

data

The attribute data.

ATTR_DIRECT

When attributes are too large to store directly in the inode, each attribute is stored in its own file. ATTR_DIRECT 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:

class

The class of the attribute.

subclass

The subclass of the attribute.

length

The length of the attribute data. This allows attribute operations to check the length of an attribute without reading the attribute inode.

inumber

The inode number of the file containing the attribute data. The inode is part of the attribute fileset.

The attribute records in the inode terminate with a record that has a format of zero (for compatibility with file systems that have the last 80 bytes of all inodes set to NULL ).

SEE ALSO

setext (1M), stat(2), fs_vxfs (4), vxfsio (7)
 ^ Return to Top Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation  
Manual: Devices (4)  
VERITAS Software Corporation
www.veritas.com