xfs
[Top] [All Lists]

Re: [PATCH 2/2] xfs: avoid shutdown hang in xlog_wait()

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs: avoid shutdown hang in xlog_wait()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sun, 25 Mar 2012 09:46:49 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120324170302.GB21708@xxxxxxxxxxxxx>
References: <1332467263-12985-1-git-send-email-david@xxxxxxxxxxxxx> <1332467263-12985-3-git-send-email-david@xxxxxxxxxxxxx> <20120324170302.GB21708@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Mar 24, 2012 at 01:03:02PM -0400, Christoph Hellwig wrote:
> On Fri, Mar 23, 2012 at 12:47:43PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > When a shutdown is triggered from failing to find an item in the AIL
> > during delete, we can be called from either metadata IO completion
> > context or from log IO completion context. In the case of log IO
> > completion context, we must indicate that this is a log error so
> > that the forced shutdown does not attempt to flush the log.
> > 
> > To flush the log whilst in log IO completion will cause a deadlock
> > as the shutdown won't proceed until log IO completes, and log Io
> > cannot complete because it has blocked waiting for itself to
> > complete....
> > 
> > We delete items in the AIL from log IO completion when we are
> > unpinning in-memory only items, or items that do not require
> > writeback to remove from the AIL (e.g. EFI/EFD items). Hence there
> > are several locations that need this treatment.
> 
> Looks good.  I wonder if it might be simple to simply pass a flags
> argument to xfs_ail_delete(_bulk) which tells which kind of shutdown
> to do.

I thought about doing that, but it seems strange and unusual to tell
code how to handle errors internally instead of returning the error
and letting the caller handle it...

I don't mind either way, though. If you prefer I pass in the
shutdown flag, I can change it all to do that....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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