Re: [ext2resize] Re: Odd stride issues
Status: Inactive
Brought to you by:
adilger
From: Robert W. <rj...@du...> - 2002-09-13 04:14:30
|
> I don't think this will have an effect. If you specify "-O resize_inode" > to mke2fs, it will pick a default of 1024x the specified filesystem size, > and the libext2 code will create a resize inode with enough blocks, > after it has determined all of the needed parameters (ext2fs_initialize() > maybe). I _think_ there is a calculation in that same function which > determines the inode table offset, based on the group blocks + 3 (super, > block, inode bitmaps). It probably needs s_reserved_gdt_blocks added in > there and we will be happy. Is this the one? /* * Overhead is the number of bookkeeping blocks per group. It * includes the superblock backup, the group descriptor * backups, the inode bitmap, the block bitmap, and the inode * table. */ overhead = (int) (2 + fs->inode_blocks_per_group); if (ext2fs_bg_has_super(fs, fs->group_desc_count - 1)) overhead += 1 + fs->desc_blocks + super->s_reserved_gdt_blocks; Looks like it only does this if there's a backup superblock there. Would this work: /* * Overhead is the number of bookkeeping blocks per group. It * includes the superblock backup, the group descriptor * backups, the inode bitmap, the block bitmap, and the inode * table. */ overhead = (int) (2 + fs->inode_blocks_per_group); /* if (ext2fs_bg_has_super(fs, fs->group_desc_count - 1)) */ overhead += 1 + fs->desc_blocks + super->s_reserved_gdt_blocks; Would that be safe? Regards, Robert. |