[kernel] r16120 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series

Ben Hutchings benh at alioth.debian.org
Wed Aug 11 03:26:20 UTC 2010


Author: benh
Date: Wed Aug 11 03:26:15 2010
New Revision: 16120

Log:
ext4: fix freeze deadlock under IO

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/ext4-fix-freeze-deadlock-under-IO.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/20

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Wed Aug 11 03:07:01 2010	(r16119)
+++ dists/sid/linux-2.6/debian/changelog	Wed Aug 11 03:26:15 2010	(r16120)
@@ -21,6 +21,7 @@
   * drm/i915: disable FBC when more than one pipe is active
     (Closes: #589077)
   * IB/ipath: Fix probe failure path (Closes: #579393)
+  * ext4: fix freeze deadlock under IO (regression introduced in 2.6.32.17)
 
   [ Martin Michlmayr ]
   * [armel/orion5x] Add a missing #include to fix a build issue.

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ext4-fix-freeze-deadlock-under-IO.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ext4-fix-freeze-deadlock-under-IO.patch	Wed Aug 11 03:26:15 2010	(r16120)
@@ -0,0 +1,53 @@
+From: Eric Sandeen <sandeen at sandeen.net>
+Date: Sun, 1 Aug 2010 17:33:29 -0400
+Subject: [PATCH] ext4: fix freeze deadlock under IO
+
+commit 437f88cc031ffe7f37f3e705367f4fe1f4be8b0f upstream.
+
+Commit 6b0310fbf087ad6 caused a regression resulting in deadlocks
+when freezing a filesystem which had active IO; the vfs_check_frozen
+level (SB_FREEZE_WRITE) did not let the freeze-related IO syncing
+through.  Duh.
+
+Changing the test to FREEZE_TRANS should let the normal freeze
+syncing get through the fs, but still block any transactions from
+starting once the fs is completely frozen.
+
+I tested this by running fsstress in the background while periodically
+snapshotting the fs and running fsck on the result.  I ran into
+occasional deadlocks, but different ones.  I think this is a
+fine fix for the problem at hand, and the other deadlocky things
+will need more investigation.
+
+Reported-by: Phillip Susi <psusi at cfl.rr.com>
+Signed-off-by: Eric Sandeen <sandeen at redhat.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+---
+ fs/ext4/super.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c
+index e046eba..282a270 100644
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -241,7 +241,7 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
+ 	if (sb->s_flags & MS_RDONLY)
+ 		return ERR_PTR(-EROFS);
+ 
+-	vfs_check_frozen(sb, SB_FREEZE_WRITE);
++	vfs_check_frozen(sb, SB_FREEZE_TRANS);
+ 	/* Special case here: if the journal has aborted behind our
+ 	 * backs (eg. EIO in the commit thread), then we still need to
+ 	 * take the FS itself readonly cleanly. */
+@@ -3608,7 +3608,7 @@ int ext4_force_commit(struct super_block *sb)
+ 
+ 	journal = EXT4_SB(sb)->s_journal;
+ 	if (journal) {
+-		vfs_check_frozen(sb, SB_FREEZE_WRITE);
++		vfs_check_frozen(sb, SB_FREEZE_TRANS);
+ 		ret = ext4_journal_force_commit(journal);
+ 	}
+ 
+-- 
+1.7.1
+

Modified: dists/sid/linux-2.6/debian/patches/series/20
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/20	Wed Aug 11 03:07:01 2010	(r16119)
+++ dists/sid/linux-2.6/debian/patches/series/20	Wed Aug 11 03:26:15 2010	(r16120)
@@ -25,3 +25,4 @@
 + bugfix/x86/drm-i915-Check-overlay-stride-errata-for-i830-and-i8.patch
 + bugfix/x86/drm-i915-disable-FBC-when-more-than-one-pipe-is-active.patch
 + bugfix/all/ipath-Fix-probe-failure-path.patch
++ bugfix/all/ext4-fix-freeze-deadlock-under-IO.patch



More information about the Kernel-svn-changes mailing list