summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@fedoraproject.org>2009-05-15 04:32:17 +0000
committerEric Sandeen <sandeen@fedoraproject.org>2009-05-15 04:32:17 +0000
commitbdcaa2518787233ec9a3a924a64689307b0489a1 (patch)
tree318af5725658daa3230888e36cf87f3d7eb22ea0
parent4011bd91c92d96627f98070d1adfeca63294975a (diff)
downloade2fsprogs-bdcaa2518787233ec9a3a924a64689307b0489a1.tar.gz
e2fsprogs-bdcaa2518787233ec9a3a924a64689307b0489a1.tar.xz
e2fsprogs-bdcaa2518787233ec9a3a924a64689307b0489a1.zip
* Thu May 14 2009 Eric Sandeen <sandeen@redhat.com> 1.41.4-9e2fsprogs-1_41_4-9_fc11
- Fix corrupted filesystems with mis-set i_file_acl_hi (#500935)
-rw-r--r--e2fsprogs-1.41.4-i_file_acl_high-fix.patch79
-rw-r--r--e2fsprogs.spec8
2 files changed, 86 insertions, 1 deletions
diff --git a/e2fsprogs-1.41.4-i_file_acl_high-fix.patch b/e2fsprogs-1.41.4-i_file_acl_high-fix.patch
new file mode 100644
index 0000000..f4adb04
--- /dev/null
+++ b/e2fsprogs-1.41.4-i_file_acl_high-fix.patch
@@ -0,0 +1,79 @@
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Fri, 24 Apr 2009 01:31:16 +0000 (-0400)
+Subject: e2fsck: On a 32-bit filesystem, make sure i_file_acl_high is zero
+X-Git-Tag: v1.41.5~3
+X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=911ec6261568ca56d2d7b9a15f00578c4d127cf4
+
+e2fsck: On a 32-bit filesystem, make sure i_file_acl_high is zero
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+---
+
+diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
+index 04aeb26..3b05cf2 100644
+--- a/e2fsck/pass1.c
++++ b/e2fsck/pass1.c
+@@ -935,6 +935,10 @@ void e2fsck_pass1(e2fsck_t ctx)
+ if (inode->i_faddr || frag || fsize ||
+ (LINUX_S_ISDIR(inode->i_mode) && inode->i_dir_acl))
+ mark_inode_bad(ctx, ino);
++ if (!(fs->super->s_feature_incompat &
++ EXT4_FEATURE_INCOMPAT_64BIT) &&
++ inode->osd2.linux2.l_i_file_acl_high != 0)
++ mark_inode_bad(ctx, ino);
+ if ((fs->super->s_creator_os == EXT2_OS_LINUX) &&
+ !(fs->super->s_feature_ro_compat &
+ EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
+diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
+index 28badc9..b33f596 100644
+--- a/e2fsck/pass2.c
++++ b/e2fsck/pass2.c
+@@ -1353,6 +1353,17 @@ extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
+ }
+ }
+
++ if (!(fs->super->s_feature_incompat &
++ EXT4_FEATURE_INCOMPAT_64BIT) &&
++ inode.osd2.linux2.l_i_file_acl_high != 0) {
++ pctx.num = inode.osd2.linux2.l_i_file_acl_high;
++ if (fix_problem(ctx, PR_2_I_FILE_ACL_HI_ZERO, &pctx)) {
++ inode.osd2.linux2.l_i_file_acl_high = 0;
++ inode_modified++;
++ } else
++ not_fixed++;
++ }
++
+ if (inode.i_file_acl &&
+ ((inode.i_file_acl < fs->super->s_first_data_block) ||
+ (inode.i_file_acl >= fs->super->s_blocks_count))) {
+diff --git a/e2fsck/problem.c b/e2fsck/problem.c
+index 8293475..3ff17f0 100644
+--- a/e2fsck/problem.c
++++ b/e2fsck/problem.c
+@@ -1286,6 +1286,11 @@ static struct e2fsck_problem problem_table[] = {
+ N_("@E references @i %Di found in @g %g's unused inodes area.\n"),
+ PROMPT_FIX, PR_PREEN_OK },
+
++ /* i_blocks_hi should be zero */
++ { PR_2_I_FILE_ACL_HI_ZERO,
++ N_("i_file_acl_hi @F %N, @s zero.\n"),
++ PROMPT_CLEAR, 0 },
++
+ /* Pass 3 errors */
+
+ /* Pass 3: Checking directory connectivity */
+diff --git a/e2fsck/problem.h b/e2fsck/problem.h
+index 1cb054c..ce8de76 100644
+--- a/e2fsck/problem.h
++++ b/e2fsck/problem.h
+@@ -768,6 +768,9 @@ struct problem_context {
+ /* Inode found in group unused inodes area */
+ #define PR_2_INOREF_IN_UNUSED 0x020047
+
++/* i_file_acl_hi should be zero */
++#define PR_2_I_FILE_ACL_HI_ZERO 0x020048
++
+ /*
+ * Pass 3 errors
+ */
+
diff --git a/e2fsprogs.spec b/e2fsprogs.spec
index 84331ea..525f06c 100644
--- a/e2fsprogs.spec
+++ b/e2fsprogs.spec
@@ -4,7 +4,7 @@
Summary: Utilities for managing ext2, ext3, and ext4 filesystems
Name: e2fsprogs
Version: 1.41.4
-Release: 8%{?dist}
+Release: 9%{?dist}
# License based on upstream-modified COPYING file,
# which clearly states "V2" intent.
License: GPLv2
@@ -21,6 +21,7 @@ Patch5: e2fsprogs-1.41.4-fix-blkid-segfault.patch
Patch6: e2fsprogs-1.41.4-ignore-NEEDS_RECOVERY-mismatch.patch
Patch7: e2fsprogs-1.41.4-ext4-resize-fixes.patch
Patch8: e2fsprogs-1.41.4-fix-external-journals.patch
+Patch9: e2fsprogs-1.41.4-i_file_acl_high-fix.patch
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -110,6 +111,8 @@ SMP systems.
%patch7 -p1 -b .resize
# Fix external journals
%patch8 -p1 -b .ext-journal
+# e2fsck: On a 32-bit filesystem, make sure i_file_acl_high is zero
+%patch9 -p1 -b .acl_hi
%build
%configure --enable-elf-shlibs --enable-nls --disable-e2initrd-helper --enable-blkid-devmapper --enable-blkid-selinux
@@ -308,6 +311,9 @@ fi
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
%changelog
+* Thu May 14 2009 Eric Sandeen <sandeen@redhat.com> 1.41.4-9
+- Fix corrupted filesystems with mis-set i_file_acl_hi (#500935)
+
* Wed Apr 22 2009 Eric Sandeen <sandeen@redhat.com> 1.41.4-8
- Fix support for external journals