e2fsprogs/e2fsprogs-resize-fix.patch
Eric Sandeen 19ae768613 * Mon Mar 03 2008 Eric Sandeen <esandeen@redhat.com> 1.40.7-2
- second try at fixing resize2fs vs. large inodes... (#434893)
2008-03-03 20:41:09 +00:00

31 lines
1.1 KiB
Diff

Index: e2fsprogs-1.40.7/resize/resize2fs.c
===================================================================
--- e2fsprogs-1.40.7.orig/resize/resize2fs.c
+++ e2fsprogs-1.40.7/resize/resize2fs.c
@@ -1168,11 +1168,12 @@ static errcode_t inode_scan_and_fix(ext2
* elsewhere in the inode table
*/
while (1) {
- retval = ext2fs_get_next_inode(scan, &ino, &inode);
+ retval = ext2fs_get_next_inode_full(scan, &ino, buf, inode_size);
if (retval) goto errout;
if (!ino)
break;
+ memcpy(&inode, buf, sizeof(struct ext2_inode));
if (inode.i_links_count == 0 && ino != EXT2_RESIZE_INO)
continue; /* inode not in use */
@@ -1221,10 +1222,7 @@ static errcode_t inode_scan_and_fix(ext2
}
}
ext2fs_mark_inode_bitmap(rfs->new_fs->inode_map, new_inode);
- memcpy(buf, &inode, sizeof(struct ext2_inode));
large_inode = (struct ext2_inode_large *)buf;
- large_inode->i_extra_isize = sizeof(struct ext2_inode_large) -
- EXT2_GOOD_OLD_INODE_SIZE;
if (pb.changed) {
/* Get the new version of the inode */
retval = ext2fs_read_inode_full(rfs->old_fs, ino,