3 inode


UFS2 inode   , . . ? , , inod' :

 

struct ufs2_dinode {

/* 0x00 */ u_int16_t di_mode; /* 0: IFMT, permissions; see below. */

/* 0x02 */ int16_t di_nlink; /* 2: File link count. */

/* 0x04 */ u_int32_t di_uid; /* 4: File owner. */

/* 0x08 */ u_int32_t di_gid; /* 8: File group. */

/* 0x0C */ u_int32_t di_blksize; /* 12: Inode blocksize. */

/* 0x10 */ u_int64_t di_size; /* 16: File byte count. */

/* 0x18 */ u_int64_t di_blocks; /* 24: Bytes actually held. */

/* 0x20 */ ufs_time_t di_atime; /* 32: Last access time. */

/* 0x28 */ ufs_time_t di_mtime; /* 40: Last modified time. */

/* 0x30 */ ufs_time_t di_ctime; /* 48: Last inode change time. */

/* 0x38 */ ufs_time_t di_birthtime; /* 56: Inode creation time. */

/* 0x40 */ int32_t di_mtimensec; /* 64: Last modified time. */

/* 0x44 */ int32_t di_atimensec; /* 68: Last access time. */

/* 0x48 */ int32_t di_ctimensec; /* 72: Last inode change time. */

/* 0x4C */ int32_t di_birthnsec; /* 76: Inode creation time. */

/* 0x50 */ int32_t di_gen; /* 80: Generation number. */

/* 0x54 */ u_int32_t di_kernflags; /* 84: Kernel flags. */

/* 0x58 */ u_int32_t di_flags; /* 88: Status flags (chflags). */

/* 0x5C */ int32_t di_extsize; /* 92: External attributes block. */

/* 0x60 */ ufs2_daddr_tdi_extb[NXADDR];/* 96: External attributes block. */

/* 0x70 */ ufs2_daddr_tdi_db[NDADDR]; /* 112: Direct disk blocks. */

/* 0xD0 */ ufs2_daddr_tdi_ib[NIADDR]; /* 208: Indirect disk blocks. */

/* 0xE8 */ int64_t di_spare[3]; /* 232: Reserved; currently unused */

};