29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gpfs_iattr_t Structure<br />

Name<br />

gpfs_iattr_t – Contains attributes of a <strong>GPFS</strong> inode.<br />

Library<br />

<strong>GPFS</strong> Library (libgpfs.a for AIX, libgpfs.so for Linux)<br />

Structure<br />

typedef struct gpfs_iattr<br />

{<br />

int ia_version; /* this struct version */<br />

int ia_reclen; /* sizeof this structure */<br />

int ia_checksum; /* validity check on iattr struct */<br />

gpfs_mode_t ia_mode; /* access mode */<br />

gpfs_uid_t ia_uid; /* owner uid */<br />

gpfs_gid_t ia_gid; /* owner gid */<br />

gpfs_ino_t ia_inode; /* file inode number */<br />

gpfs_gen_t ia_gen; /* inode generation number */<br />

short ia_nlink; /* number of links */<br />

short ia_flags; /* flags (defined below) */<br />

int ia_blocksize; /* preferred block size for io */<br />

gpfs_mask_t ia_mask; /* initial attribute mask-not used*/<br />

gpfs_off64_t ia_size; /* file size in bytes */<br />

gpfs_off64_t ia_blocks; /*512 byte blocks of disk held by file*/<br />

gpfs_timestruc_t ia_atime; /* time of last access */<br />

gpfs_timestruc_t ia_mtime; /* time of last data modification */<br />

gpfs_timestruc_t ia_ctime; /* time of last status change */<br />

gpfs_dev_t ia_rdev; /* ID of device */<br />

int ia_xperm; /*non-zero if file has extended acl*/<br />

int ia_modsnapid; /*Internal snapshot ID indicating<br />

the last time that the file was modified*/<br />

unsigned int ia_filesetid; /* fileset ID */<br />

unsigned int ia_datapoolid; /* storage pool ID for data */<br />

} gpfs_iattr_t;<br />

/* Define flags for inode attributes */<br />

#define <strong>GPFS</strong>_IAFLAG_SNAPDIR 0x0001 /* (obsolete) */<br />

#define <strong>GPFS</strong>_IAFLAG_USRQUOTA 0x0002 /*inode is a user quota file*/<br />

#define <strong>GPFS</strong>_IAFLAG_GRPQUOTA 0x0004 /*inode is a group quota file*/<br />

#define <strong>GPFS</strong>_IAFLAG_ERROR 0x0008 /* error reading inode */<br />

/* Define flags for inode replication attributes */<br />

#define <strong>GPFS</strong>_IAFLAG_REPLMETA 0x0200 /* metadata replication set */<br />

#define <strong>GPFS</strong>_IAFLAG_REPLDATA 0x0400 /* data replication set */<br />

#define <strong>GPFS</strong>_IAFLAG_EXPOSED 0x0800 /*may have data on<br />

suspended disks*/<br />

#define <strong>GPFS</strong>_IAFLAG_ILLREPLICATED 0x1000<br />

/*maybe not properly replicated*/<br />

#define <strong>GPFS</strong>_IAFLAG_UNBALANCED 0x2000<br />

/*maybe not properly balanced*/<br />

#define <strong>GPFS</strong>_IAFLAG_DATAUPDATEMISS 0x4000<br />

/* has stale data blocks on unavailable disk */<br />

#define <strong>GPFS</strong>_IAFLAG_METAUPDATEMISS 0x8000<br />

/* has stale metadata on unavailable disk */<br />

#define <strong>GPFS</strong>_IAFLAG_ILLPLACED 0x0100<br />

/* may not be properly placed */<br />

#define <strong>GPFS</strong>_IAFLAG_FILESET_ROOT 0x0010<br />

/* root dir of a fileset */<br />

#define <strong>GPFS</strong>_IAFLAG_NO_SNAP_RESTORE 0x0020<br />

Chapter 9. <strong>GPFS</strong> programming interfaces 307

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!