xfs
[Top] [All Lists]

Re: [PATCH for-2.6.33] xfs: flush all log buffers in xlog_dealloc_log

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH for-2.6.33] xfs: flush all log buffers in xlog_dealloc_log
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 5 Feb 2010 06:35:50 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20100205025811.GB11483@xxxxxxxxxxxxxxxx>
References: <20100201220813.GA3519@xxxxxxxxxxxxx> <20100203105545.GA1047@xxxxxxxxxxxxx> <20100204081422.GF5332@xxxxxxxxxxxxxxxx> <20100204161050.GB11206@xxxxxxxxxxxxx> <20100205025811.GB11483@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Fri, Feb 05, 2010 at 01:58:11PM +1100, Dave Chinner wrote:
> > and there's
> > also a very similar one from Ed Cashin <ecashin@xxxxxxxxxx> in
> > mail archives from November.
> 
> Yeah, that's clearly IO completion after the call to
> xfs_unmountfs_wait(). That does a xfs_wait_buftarg() call
> which waits for all hashed buffers on the buftarg except for
> those that are XBF_FS_MANAGED - the superblock.
> 
> Looking at xfs_fs_put_super(), the superblock buffer is freed after
> xfs_unmountfs() frees the log, so if the superblock was logged
> and is undergoing IO then xfs_unmountfs_wait() would not have
> blocked on it and it could leak past the "no more IO should
> bein progress" barrier that xfs_unmountfs_wait() is supposed to
> provide.
> 
> Does this look like a plausible cause of the problem?

We just did a xfs_unmountfs_writesb before the call to
xfs_unmountfs_wait, so the superblock buffer should be a sync buffer at
that point, so something more fishy is going on here.  syncd is also
stopped before that call, so that gets rid of another possible case
of an async buffer pending.

Independent of that I think xfs_wait_buftarg waiting for the SB buffer
seems correct to me, but I fear something else is going on here.

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