* Mon Mar 03 2008 Eric Sandeen <esandeen@redhat.com> 1.40.7-2

- second try at fixing resize2fs vs. large inodes... (#434893)
This commit is contained in:
Eric Sandeen 2008-03-03 20:41:09 +00:00
parent d9b13a5c3e
commit 19ae768613
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,30 @@
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,

View File

@ -4,7 +4,7 @@
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
Name: e2fsprogs
Version: 1.40.7
Release: 1%{?dist}
Release: 2%{?dist}
# License based on upstream-modified COPYING file,
# which clearly states "V2" intent.
License: GPLv2
@ -16,6 +16,7 @@ Source3: uuidd.init
Patch1: e2fsprogs-1.38-etcblkid.patch
Patch2: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
Patch3: e2fsprogs-1.40.7-swap-inode-full-fix.patch
Patch4: e2fsprogs-resize-fix.patch
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -94,6 +95,8 @@ SMP systems.
%patch2 -p1 -b .featurecheck
# fix in-inode ea swapping in swap_inode_full
%patch3 -p1 -b .swapinode
# resize2fs vs. large inodes, take 2
%patch4 -p1 -b .resizelarge
%build
%configure --enable-elf-shlibs --enable-nls --disable-e2initrd-helper --enable-blkid-devmapper --enable-blkid-selinux
@ -281,6 +284,9 @@ fi
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
%changelog
* Mon Mar 03 2008 Eric Sandeen <esandeen@redhat.com> 1.40.7-2
- second try at fixing resize2fs vs. large inodes... (#434893)
* Fri Feb 29 2008 Eric Sandeen <esandeen@redhat.com> 1.40.7-1
- New upstream version, special leap-day edition
- Fix resize2fs losing inline xattrs when shrinking (#434893)