rpms/kernel/devel linux-2.6-btrfs-fix-umount-hang.patch, NONE, 1.1 kernel.spec, 1.1498, 1.1499

Josef Bacik josef at fedoraproject.org
Thu Apr 2 17:37:13 UTC 2009


Author: josef

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6846

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-btrfs-fix-umount-hang.patch 
Log Message:
adding linux-2.6-btrfs-fix-umount-hang.patch to fix a umount hang on btrfs


linux-2.6-btrfs-fix-umount-hang.patch:

--- NEW FILE linux-2.6-btrfs-fix-umount-hang.patch ---
Need to check kthread_should_stop after schedule_timeout() before calling schedule(). This causes threads to sleep with potentially no one to wake them up causing mount(2) to hang in btrfs_stop_workers waiting for threads to stop. Race, IMO, is more evident on UP than on SMP.

Signed-off-by: Amit Gud <gud at ksu.edu>

diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index c84ca1f..4c1f3e5 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -195,6 +195,9 @@ again_locked:
 				if (!list_empty(&worker->pending))
 					continue;
 
+				if (kthread_should_stop())
+					return 0;
+
 				/* still no more work?, sleep for real */
 				spin_lock_irq(&worker->lock);
 				set_current_state(TASK_INTERRUPTIBLE);


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1498
retrieving revision 1.1499
diff -u -r1.1498 -r1.1499
--- kernel.spec	2 Apr 2009 13:04:01 -0000	1.1498
+++ kernel.spec	2 Apr 2009 17:36:42 -0000	1.1499
@@ -690,6 +690,7 @@
 # fs fixes
 Patch2920: linux-2.6-ext4-flush-on-close.patch
 Patch3000: linux-2.6-btrfs-experimental-branch.patch
+Patch3001: linux-2.6-btrfs-fix-umount-hang.patch
 Patch3010: linux-2.6-relatime-by-default.patch
 Patch3020: linux-2.6-fiemap-header-install.patch
 
@@ -1146,6 +1147,7 @@
 
 # btrfs
 #ApplyPatch linux-2.6-btrfs-experimental-branch.patch
+ApplyPatch linux-2.6-btrfs-fix-umount-hang.patch
 
 # relatime
 #ApplyPatch linux-2.6-relatime-by-default.patch
@@ -1890,6 +1892,9 @@
 #	                ||----w |
 #	                ||     ||
 %changelog
+* Thu Apr 02 2009 Josef Bacik <josef at toxicpanda.com>
+- linux-2.6-btrfs-fix-umount-hang.patch: fix umount hang on btrfs
+
 * Thu Apr 02 2009 Kyle McMartin <kyle at redhat.com>
 - fix-ppc-debug_kmap_atomic.patch: fix build failures on ppc.
 




More information about the fedora-extras-commits mailing list