Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/ext2fs/ext2fs.h
Show First 20 Lines • Show All 389 Lines • ▼ Show 20 Lines | struct ext2_gd { | ||||
uint16_t ext4bgd_i_unused_hi; /* high bits of unused inode count */ | uint16_t ext4bgd_i_unused_hi; /* high bits of unused inode count */ | ||||
uint32_t ext4bgd_x_bitmap_hi; /* high bits of snapshot exclusion */ | uint32_t ext4bgd_x_bitmap_hi; /* high bits of snapshot exclusion */ | ||||
uint16_t ext4bgd_b_bmap_csum_hi;/* high bits of block bitmap checksum */ | uint16_t ext4bgd_b_bmap_csum_hi;/* high bits of block bitmap checksum */ | ||||
uint16_t ext4bgd_i_bmap_csum_hi;/* high bits of inode bitmap checksum */ | uint16_t ext4bgd_i_bmap_csum_hi;/* high bits of inode bitmap checksum */ | ||||
uint32_t ext4bgd_reserved; | uint32_t ext4bgd_reserved; | ||||
}; | }; | ||||
#define E2FS_REV0_GD_SIZE (sizeof(struct ext2_gd) / 2) | #define E2FS_REV0_GD_SIZE (sizeof(struct ext2_gd) / 2) | ||||
#define E2FS_64BIT_GD_SIZE (sizeof(struct ext2_gd)) | |||||
/* | /* | ||||
* Macro-instructions used to manage several block sizes | * Macro-instructions used to manage several block sizes | ||||
*/ | */ | ||||
#define EXT2_MIN_BLOCK_LOG_SIZE 10 | #define EXT2_MIN_BLOCK_LOG_SIZE 10 | ||||
#define EXT2_BLOCK_SIZE(s) ((s)->e2fs_bsize) | #define EXT2_BLOCK_SIZE(s) ((s)->e2fs_bsize) | ||||
#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(uint32_t)) | #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(uint32_t)) | ||||
#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->e2fs_isize) | #define EXT2_INODE_SIZE(s) (EXT2_SB(s)->e2fs_isize) | ||||
/* | /* | ||||
* Macro-instructions used to manage fragments | * Macro-instructions used to manage fragments | ||||
*/ | */ | ||||
#define EXT2_MIN_FRAG_SIZE 1024 | #define EXT2_MIN_FRAG_SIZE 1024 | ||||
#define EXT2_MAX_FRAG_SIZE 4096 | |||||
#define EXT2_MIN_FRAG_LOG_SIZE 10 | #define EXT2_MIN_FRAG_LOG_SIZE 10 | ||||
#define EXT2_MAX_FRAG_LOG_SIZE 30 | |||||
#define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->e2fs_fsize) | #define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->e2fs_fsize) | ||||
#define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->e2fs_fpb) | #define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->e2fs_fpb) | ||||
/* | /* | ||||
* Macro-instructions used to manage group descriptors | * Macro-instructions used to manage group descriptors | ||||
*/ | */ | ||||
#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->e2fs_bpg) | #define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->e2fs_bpg) | ||||
#define EXT2_DESCS_PER_BLOCK(s) (EXT2_HAS_INCOMPAT_FEATURE((s), \ | #define EXT2_DESCS_PER_BLOCK(s) (EXT2_HAS_INCOMPAT_FEATURE((s), \ | ||||
EXT2F_INCOMPAT_64BIT) ? ((s)->e2fs_bsize / sizeof(struct ext2_gd)) : \ | EXT2F_INCOMPAT_64BIT) ? ((s)->e2fs_bsize / sizeof(struct ext2_gd)) : \ | ||||
((s)->e2fs_bsize / E2FS_REV0_GD_SIZE)) | ((s)->e2fs_bsize / E2FS_REV0_GD_SIZE)) | ||||
#endif /* !_FS_EXT2FS_EXT2FS_H_ */ | #endif /* !_FS_EXT2FS_EXT2FS_H_ */ |