xfs
[Top] [All Lists]

Re: PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_bu

To: Luben Tuikov <luben@xxxxxxxxxxxx>
Subject: Re: PATCH: sleeping while holding a lock in _pagebuf_free_bh()::page_buf.c
From: Simon Matter <simon.matter@xxxxxxxxxxxxxxxx>
Date: Tue, 22 Oct 2002 08:21:47 +0200
Cc: linux-xfs <linux-xfs@xxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxx>
Organization: Sauter AG, Basel
References: <3DB49424.9E4CAC0F@xxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
Luben Tuikov schrieb:
> 
> 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).

I've had some troubles with one of my servers after a failing disk from
the SoftRAID. IIRC it was like this: I replaced the broken disk and
added it to the RAID volume using a boot CD. Before the volume was
synced, I rebootet. The box came up but hung when it tried to mount some
XFS volumes on the syncing RAID. My solution was to boot with
init=/bin/sh, wait for the sync to complete, and then do a normal boot.
Could this be the bug you found here?

Simon

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