When moving directories into new block groups (which would only happen
when shrinking a filesystem), resize2fs would increase the directory
in-use count by 2 times the necessary value, due to a change in
ext2fs_inode_alloc_stats() made in e2fsprogs 1.26. This is largely
harmless, but it does result in a filesystem corruption for e2fsck to
fix.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
struct ext2_inode *inode = NULL;
ext2_inode_scan scan = NULL;
errcode_t retval;
- int group;
char *block_buf = 0;
ext2_ino_t start_to_move;
blk_t orig_size, new_block;
inode, inode_size);
if (retval) goto errout;
- group = (new_inode-1) / EXT2_INODES_PER_GROUP(rfs->new_fs->super);
- if (LINUX_S_ISDIR(inode->i_mode)) {
- rfs->new_fs->group_desc[group].bg_used_dirs_count++;
- ext2fs_group_desc_csum_set(rfs->new_fs, group);
- }
-
#ifdef RESIZE2FS_DEBUG
if (rfs->flags & RESIZE_DEBUG_INODEMAP)
printf("Inode moved %u->%u\n", ino, new_inode);