xfs
[Top] [All Lists]

Re: Review: Clear unwritten flag on during partial page truncation

To: Nathan Scott <nscott@xxxxxxxxxx>
Subject: Re: Review: Clear unwritten flag on during partial page truncation
From: David Chinner <dgc@xxxxxxx>
Date: Thu, 21 Dec 2006 22:37:24 +1100
Cc: David Chinner <dgc@xxxxxxx>, xfs-dev@xxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <1166681818.5572.190.camel@edge>
References: <20061220062813.GU44411608@melbourne.sgi.com> <1166681818.5572.190.camel@edge>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Thu, Dec 21, 2006 at 05:16:58PM +1100, Nathan Scott wrote:
> On Wed, 2006-12-20 at 17:28 +1100, David Chinner wrote:
> > Hence the solution is to clear the private buffer flags in
> > xfs_vm_invalidatepage() so that when we extend the file the buffers
> > on the page are all consistent.
> > 
> > Patch below. Comments?
> 
> Looks good Dave, nice sleuthing.
> 
> In hindsight, it'd have been really good to have gone for the real
> BH_Unwritten flag upfront, and then being able to clear that inside
> discard_buffer (like was done for BH_Delay)...  if we did that, then
> all this new code we're adding here (to just clear_buffer_unwritten,
> ultimately) and also the complete hack in xfs_count_page_state could
> be removed.  It still might be worth considering doing that, in case
> there's other hard-to-hit-but-not-yet-uncovered bugs lurking along
> the same lines.  But alot of effort, with the possibility of it not
> being merged at all, as it touches code outside XFS.  D'oh.

Yep, pretty much my thinking as well.

I forgot about that hack in xfs_count_page_state() - we should
be able to remove that with this change, right?

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


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