rpms/e2fsprogs/devel e2fsprogs-1.40.7-swap-inode-full-fix.patch, NONE, 1.1 e2fsprogs.spec, 1.103, 1.104

Eric Sandeen (sandeen) fedora-extras-commits at redhat.com
Fri Feb 29 22:12:56 UTC 2008


Author: sandeen

Update of /cvs/pkgs/rpms/e2fsprogs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14800

Modified Files:
	e2fsprogs.spec 
Added Files:
	e2fsprogs-1.40.7-swap-inode-full-fix.patch 
Log Message:
* Fri Feb 29 2008 Eric Sandeen <esandeen at redhat.com> 1.40.7-1
- New upstream version, special leap-day edition
- Fix resize2fs losing inline xattrs when shrinking (#434893)
  and add patch to fix swap_inode_full in this case
- Allow mke2fs & tune2fs to manipulate large_file feature (#258381)
- Handle lvm error conditions in libblkid (#433857)
- Allow tune2fs to clear the resize_inode feature (#167816)
- Teach blkid to detect LVM2 physical volumes (#409321)
- Show "mostly printable" xattrs as text in debugfs (#430621)
- Trimmed pre-1.38 rpm changelog entries


e2fsprogs-1.40.7-swap-inode-full-fix.patch:

--- NEW FILE e2fsprogs-1.40.7-swap-inode-full-fix.patch ---
Index: e2fsprogs-1.40.7/lib/ext2fs/swapfs.c
===================================================================
--- e2fsprogs-1.40.7.orig/lib/ext2fs/swapfs.c
+++ e2fsprogs-1.40.7/lib/ext2fs/swapfs.c
@@ -133,7 +133,7 @@ void ext2fs_swap_inode_full(ext2_filsys 
 			    struct ext2_inode_large *f, int hostorder,
 			    int bufsize)
 {
-	unsigned i, has_data_blocks, extra_isize;
+	unsigned i, has_data_blocks, extra_isize, attr_magic;
 	int islnk = 0;
 	__u32 *eaf, *eat;
 
@@ -231,13 +231,17 @@ void ext2fs_swap_inode_full(ext2_filsys 
 
 	eaf = (__u32 *) (((char *) f) + sizeof(struct ext2_inode) +
 					extra_isize);
-
-	if (ext2fs_swab32(*eaf) != EXT2_EXT_ATTR_MAGIC)
-		return; /* it seems no magic here */
-
 	eat = (__u32 *) (((char *) t) + sizeof(struct ext2_inode) +
 					extra_isize);
+
+	if (hostorder)
+		attr_magic = *eaf;
 	*eat = ext2fs_swab32(*eaf);
+	if (!hostorder)
+		attr_magic = *eat;
+
+	if (attr_magic != EXT2_EXT_ATTR_MAGIC)
+		return; /* it seems no magic here */
 
 	/* convert EA(s) */
 	ext2fs_swap_ext_attr((char *) (eat + 1), (char *) (eaf + 1),



Index: e2fsprogs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/e2fsprogs/devel/e2fsprogs.spec,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- e2fsprogs.spec	29 Feb 2008 16:47:26 -0000	1.103
+++ e2fsprogs.spec	29 Feb 2008 22:12:19 -0000	1.104
@@ -15,6 +15,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
 
 Url: http://e2fsprogs.sourceforge.net/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -91,6 +92,8 @@
 # mildly unsafe but 'til I get something better, avoid full fsck
 # after an selinux install...
 %patch2 -p1 -b .featurecheck
+# fix in-inode ea swapping in swap_inode_full
+%patch3 -p1 -b .swapinode
 
 %build
 %configure --enable-elf-shlibs --enable-nls --disable-e2initrd-helper  --enable-blkid-devmapper --enable-blkid-selinux
@@ -281,6 +284,7 @@
 * Fri Feb 29 2008 Eric Sandeen <esandeen at redhat.com> 1.40.7-1
 - New upstream version, special leap-day edition
 - Fix resize2fs losing inline xattrs when shrinking (#434893)
+  and add patch to fix swap_inode_full in this case
 - Allow mke2fs & tune2fs to manipulate large_file feature (#258381)
 - Handle lvm error conditions in libblkid (#433857)
 - Allow tune2fs to clear the resize_inode feature (#167816)




More information about the fedora-extras-commits mailing list