[Top] [All Lists]

Re: [PATCH 5/6] xfs: fix buffer shudown reference count mismatch

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/6] xfs: fix buffer shudown reference count mismatch
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 2 Nov 2012 09:13:26 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121102024351.GU29378@dastard>
References: <1351816724-3000-1-git-send-email-david@xxxxxxxxxxxxx> <1351816724-3000-6-git-send-email-david@xxxxxxxxxxxxx> <20121102024351.GU29378@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
> The fix that I've done here means all buffers going through this
> path will take an extra reference, but that reference is only
> dropped on async buffers. Because all the buffers are markd stale,
> they are removed from the LRU, and so xfs_buftarg_wait() during
> unmount does not find them and hence the remaining reference is
> never removed. Hence the perag reference still remains, and we
> assert fail there.
> Solution seems simple - set the XBF_ASYNC flag on all buffers so
> that the last reference is taken away correctly. Testing that now.

I don't like this.  ioend processing is very different for synchrous
writes, with the most important difference being that synchronous
writes need to wake the submitter at I/O completion.  From all I can
see your v2 patch breaks that beahviour.  For 3.7-rc I'd suggest
taking the additional reference conditionally.

For 3.8 I'm going to look into simply acquiring an additional reference
for synchronous writes during I/O submission to kill these special cases
all over the buffer code.

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