public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Nathan Scott <nscott@aconex.com>, David Chinner <dgc@sgi.com>,
	xfs-dev@sgi.com, xfs@oss.sgi.com
Subject: Re: Review: Clear unwritten flag on during partial page truncation
Date: Sat, 23 Dec 2006 13:55:58 +1100	[thread overview]
Message-ID: <20061223025558.GJ44411608@melbourne.sgi.com> (raw)
In-Reply-To: <20061222132142.GA23416@infradead.org>

On Fri, Dec 22, 2006 at 01:21:42PM +0000, Christoph Hellwig wrote:
> 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.
> 
> Getting code into buffer.c to fix this properly should be no problem
> at all.  As usual we prefer to fix core code instead of working around
> it.  This would also fix the data loss issue after we write through mmap
> into an unwritten extent.

Ok, I'll work up a patch for it in the new year, Christoph.

Cheers,

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

      reply	other threads:[~2006-12-23  2:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20  6:28 Review: Clear unwritten flag on during partial page truncation David Chinner
2006-12-20  8:21 ` Lachlan McIlroy
2006-12-20  9:07   ` David Chinner
2006-12-21  6:16 ` Nathan Scott
2006-12-21 11:37   ` David Chinner
2006-12-21 22:04     ` Nathan Scott
2006-12-22 13:21   ` Christoph Hellwig
2006-12-23  2:55     ` David Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061223025558.GJ44411608@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=hch@infradead.org \
    --cc=nscott@aconex.com \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox