inode(4VXFS) (VXFS) inode(4VXFS)
NAME
inode (vxfs) - format of a vxfs inode
SYNOPSIS
#include <sys/types.h>
#include <sys/fs/vx_inode.h>
DESCRIPTION
The inode list consists of fs_inopau inode entries in each
allocation unit. 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 have been
allocated. Only four bytes are used in the current
implementation.
i_atime
Time of last access, in timestruc_t format.
i_mtime
Time of last modification, in timestruc_t format.
i_ctime
Time of last inode change, in timestruc_t format.
i_aflags
These flags are used to control the allocation and
extension of files.
VX_AF_IFBAD
If this flag is set, the inode is invalid in some
way. It should be cleared when fsck is run.
VX_AF_NOEXTEND
If this flag is set, the file may not be extended
once the current reservation is exceeded. The
Copyright 1994 Novell, Inc. Page 1
inode(4VXFS) (VXFS) inode(4VXFS)
reservation may be increased by the VX_SETEXT
ioctl, but the file will not be automatically
extended.
VX_AF_NOGROW
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 setext is
run. This flag is usually set because an I/O
error occurs while extending a file.
VX_AF_ALIGN
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 allocation unit.
i_orgtype
Mapping type. Indicates how the inode mapping area is
to be interpreted. Currently there are two mapping
types supported:
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.
i_eopflags
Extended inode operation flag area.
i_eopdata
Extended inode operation data area.
i_ftarea
This is a union. The contents are determined by file
type.
For devices, the following fields are supported:
Copyright 1994 Novell, Inc. Page 2
inode(4VXFS) (VXFS) inode(4VXFS)
i_rdev
The device number of a block or character special
device.
For directories, the following fields are supported:
i_dotdot
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:
i_reserve
The number of data blocks reserved for exclusive
use by the file (preallocation). A preallocation
may be requested using 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 layout 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 layout only.) The index of the fileset
associated with this inode.
i_blocks
The number of blocks currently allocated to the file,
including any blocks allocated for indirect address
extents.
Copyright 1994 Novell, Inc. Page 3
inode(4VXFS) (VXFS) inode(4VXFS)
i_gen 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.
i_vversion
A count of the number of times the inode metadata has
been 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 <= 96 bytes in
length will be stored directly in the inode.
For the vxfs IORG_EXT4 organization type, the following
structure is used:
i_spare
Four bytes of padding, not used.
i_ies Indirect extent size. This is the size in blocks
of the indirect data extents in the file.
i_ie Array of indirect address extents. There are
NIADDR (currently 2) 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 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.
Copyright 1994 Novell, Inc. Page 4
inode(4VXFS) (VXFS) inode(4VXFS)
i_dext
An array of structures containing the direct
extent addresses and sizes. Up to NDADDR_N
(currently ten) 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 following
elements:
i_de Direct extent address.
i_des Direct extent size.
i_iattrino
(Version 2 layout only.) Indirect attribute
inode. This is the inode in the attribute fileset
that contains indirect attribute references.
REFERENCES
vxfs-specific fs(4VXFS), stat(2), types(5)
Copyright 1994 Novell, Inc. Page 5