]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix freeze deadlock under IO
authorEric Sandeen <sandeen@sandeen.net>
Sun, 1 Aug 2010 21:33:29 +0000 (17:33 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:38 +0000 (18:07 -0500)
commit963912d831b606ae776dfa7ef12ed26bfd0a6ee3
tree0ecf298ac7a90287cc20ae40982a2b1893b3d12f
parenta17fa98c4c808a8ce7d7478a7a64e108c29ca1fe
ext4: fix freeze deadlock under IO

commit 437f88cc031ffe7f37f3e705367f4fe1f4be8b0f upstream.
[The 6b0310fb below references the mainline version of what
has also been cherry picked into this 34-stable branch]

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@cfl.rr.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ext4/super.c