Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nandfs/nandfs_fs.h
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
#define NANDFS_ATIME_INO 8 /* Atime file (reserved) */ | #define NANDFS_ATIME_INO 8 /* Atime file (reserved) */ | ||||
#define NANDFS_XATTR_INO 9 /* Xattribute file (reserved) */ | #define NANDFS_XATTR_INO 9 /* Xattribute file (reserved) */ | ||||
#define NANDFS_SKETCH_INO 10 /* Sketch file (obsolete) */ | #define NANDFS_SKETCH_INO 10 /* Sketch file (obsolete) */ | ||||
#define NANDFS_USER_INO 11 /* First user's file inode number */ | #define NANDFS_USER_INO 11 /* First user's file inode number */ | ||||
#define NANDFS_SYS_NODE(ino) \ | #define NANDFS_SYS_NODE(ino) \ | ||||
(((ino) >= NANDFS_DAT_INO) && ((ino) <= NANDFS_GC_INO)) | (((ino) >= NANDFS_DAT_INO) && ((ino) <= NANDFS_GC_INO)) | ||||
#define NDADDR 12 /* Direct addresses in inode. */ | #define NANDFS_NDADDR 12 /* Direct addresses in inode. */ | ||||
#define NIADDR 3 /* Indirect addresses in inode. */ | #define NANDFS_NIADDR 3 /* Indirect addresses in inode. */ | ||||
typedef int64_t nandfs_daddr_t; | typedef int64_t nandfs_daddr_t; | ||||
typedef int64_t nandfs_lbn_t; | typedef int64_t nandfs_lbn_t; | ||||
struct nandfs_inode { | struct nandfs_inode { | ||||
uint64_t i_blocks; /* 0: size in device blocks */ | uint64_t i_blocks; /* 0: size in device blocks */ | ||||
uint64_t i_size; /* 8: size in bytes */ | uint64_t i_size; /* 8: size in bytes */ | ||||
uint64_t i_ctime; /* 16: creation time in seconds */ | uint64_t i_ctime; /* 16: creation time in seconds */ | ||||
uint64_t i_mtime; /* 24: modification time in seconds part*/ | uint64_t i_mtime; /* 24: modification time in seconds part*/ | ||||
uint32_t i_ctime_nsec; /* 32: creation time nanoseconds part */ | uint32_t i_ctime_nsec; /* 32: creation time nanoseconds part */ | ||||
uint32_t i_mtime_nsec; /* 36: modification time in nanoseconds */ | uint32_t i_mtime_nsec; /* 36: modification time in nanoseconds */ | ||||
uint32_t i_uid; /* 40: user id */ | uint32_t i_uid; /* 40: user id */ | ||||
uint32_t i_gid; /* 44: group id */ | uint32_t i_gid; /* 44: group id */ | ||||
uint16_t i_mode; /* 48: file mode */ | uint16_t i_mode; /* 48: file mode */ | ||||
uint16_t i_links_count; /* 50: number of references to the inode*/ | uint16_t i_links_count; /* 50: number of references to the inode*/ | ||||
uint32_t i_flags; /* 52: NANDFS_*_FL flags */ | uint32_t i_flags; /* 52: NANDFS_*_FL flags */ | ||||
nandfs_daddr_t i_special; /* 56: special */ | nandfs_daddr_t i_special; /* 56: special */ | ||||
nandfs_daddr_t i_db[NDADDR]; /* 64: Direct disk blocks. */ | nandfs_daddr_t i_db[NANDFS_NDADDR]; /* 64: Direct disk blocks. */ | ||||
nandfs_daddr_t i_ib[NIADDR]; /* 160: Indirect disk blocks. */ | nandfs_daddr_t i_ib[NANDFS_NIADDR]; /* 160: Indirect disk blocks. */ | ||||
uint64_t i_xattr; /* 184: reserved for extended attributes*/ | uint64_t i_xattr; /* 184: reserved for extended attributes*/ | ||||
uint32_t i_generation; /* 192: file generation for NFS */ | uint32_t i_generation; /* 192: file generation for NFS */ | ||||
uint32_t i_pad[15]; /* 196: make it 64 bits aligned */ | uint32_t i_pad[15]; /* 196: make it 64 bits aligned */ | ||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
CTASSERT(sizeof(struct nandfs_inode) == 256); | CTASSERT(sizeof(struct nandfs_inode) == 256); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 478 Lines • Show Last 20 Lines |