xfs
[Top] [All Lists]

PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_buf.c

To: linux-xfs <linux-xfs@xxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxx>
Subject: PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_buf.c
From: Luben Tuikov <luben@xxxxxxxxxxxx>
Date: Mon, 21 Oct 2002 19:56:20 -0400
Organization: Splentec Ltd.
Sender: linux-xfs-bounce@xxxxxxxxxxx
Problem: on an SMP system, BANG#@!, the unthinkable happens.
Solution: never sleep when holding a lock.

This patch applies to CVS code as of about 18:30 EDT
on Mon Oct 21 (today), and is self-explanatory.

This patch fixes the problem of the mount going into D state
indefinitely when the RAID is syncing and mount is run
right after mkfs.xfs (from shell script, no sleep between,
low system load, SMP).

If you know of similar incidents in other parts of the code
those should be fixed, probably ASAP.

Please apply,
-- 
Luben

--- linux/fs/xfs/pagebuf/page_buf.c.orig        Mon Oct 21 19:13:01 2002
+++ linux/fs/xfs/pagebuf/page_buf.c     Mon Oct 21 19:13:05 2002
@@ -710,7 +710,7 @@
                        pb_resv_bh_cnt++;
 
                        if (waitqueue_active(&pb_resv_bh_wait)) {
-                               wake_up(&pb_resv_bh_wait);
+                               wake_up_sync(&pb_resv_bh_wait);
                        }
                }


<Prev in Thread] Current Thread [Next in Thread>