[git commit master] mkfs_ext2: explain 256-byte inodes. no code changes
Denys Vlasenko
vda.linux at googlemail.com
Wed Oct 21 21:38:08 UTC 2009
On Wednesday 21 October 2009 12:12, Vladimir Dronnikov wrote:
> Hi! The patch for 256 inodes -- what is its destiny? To block
> development until you review/apply/nak it, or not?
Sorry, just saw it.
Reviewing.
Looks like you are using struct ext2_inode_large only for sizeof:
+ if (inodesize >= sizeof(struct ext2_inode_large)) {
+ int extra_isize = sizeof(struct ext2_inode_large) - EXT2_GOOD_OLD_INODE_SIZE;
then, you don't really need this structure, right?
Moreover, I don't see why you need sizeof(struct ext2_inode_large)
at all.
"man mke2fs" says that -I <inode_size> must be >= 128
and must be power of 2. So, it can be 128, i.e.,
smaller than sizeof(struct ext2_inode_large), or 256, 512, etc,
i.e. > sizeof(struct ext2_inode_large). So you just can check
inodesize != 128 instead.
With removed struct ext2_inode_large declaration and with added
sanity check on -I NUM, this patch will be ok.
Thank a lot for your work on mke2fs!
--
vda
More information about the busybox
mailing list