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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux