rpms/kernel/devel linux-2.6-ext4-fix-freeze-deadlock.patch, NONE, 1.1 kernel.spec, 1.2041, 1.2042

Eric Sandeen sandeen at fedoraproject.org
Wed Jun 23 20:49:10 UTC 2010


Author: sandeen

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv29309

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-ext4-fix-freeze-deadlock.patch 
Log Message:
* Wed Jun 23 2010 Eric Sandeen <sandeen at redhat.com>
- Fix ext4 freeze deadlock (#607245)


linux-2.6-ext4-fix-freeze-deadlock.patch:
 super.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-ext4-fix-freeze-deadlock.patch ---
[PATCH] ext4: fix freeze deadlock under IO

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>
---

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4e8983a..a45ced9 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. */
@@ -3491,7 +3491,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);
 	}
 





Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.2041
retrieving revision 1.2042
diff -u -p -r1.2041 -r1.2042
--- kernel.spec	23 Jun 2010 10:56:46 -0000	1.2041
+++ kernel.spec	23 Jun 2010 20:49:09 -0000	1.2042
@@ -690,6 +690,7 @@ Patch2910: linux-2.6-v4l-dvb-add-lgdt330
 Patch2911: linux-2.6-v4l-dvb-add-kworld-a340-support.patch
 
 # fs fixes
+Patch3000: linux-2.6-ext4-fix-freeze-deadlock.patch
 
 # NFSv4
 
@@ -1144,6 +1145,7 @@ ApplyPatch linux-2.6-execshield.patch
 #
 
 # ext4
+ApplyPatch linux-2.6-ext4-fix-freeze-deadlock.patch
 
 # xfs
 
@@ -1906,6 +1908,9 @@ fi
 #                 ||     ||
 
 %changelog
+* Wed Jun 23 2010 Eric Sandeen <sandeen at redhat.com>
+- Fix ext4 freeze deadlock (#607245)
+
 * Wed Jun 23 2010 Kyle McMartin <kyle at redhat.com>
 - Override generic's CONFIG_HZ_1000 on s390.
 



More information about the scm-commits mailing list