linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Allison Henderson <achender@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/6 v5] ext4: Add new ext4_discard_partial_page_buffers routines
Date: Sun, 21 Aug 2011 22:38:10 -0400	[thread overview]
Message-ID: <20110822023810.GA3671@thunk.org> (raw)
In-Reply-To: <1313893787-25460-2-git-send-email-achender@linux.vnet.ibm.com>

On Sat, Aug 20, 2011 at 07:29:42PM -0700, Allison Henderson wrote:
> +		/* If the range is block aligned, unmap */
> +		if (range_to_discard == blocksize) {
> +			clear_buffer_dirty(bh);
> +			bh->b_bdev = NULL;
> +			clear_buffer_mapped(bh);
> +			clear_buffer_req(bh);
> +			clear_buffer_new(bh);
> +			clear_buffer_delay(bh);
> +			clear_buffer_unwritten(bh);
> +			clear_buffer_uptodate(bh);
> +			ClearPageUptodate(page);

Is this ClearPageUptodate() necessary?  If the page is uptodate, and
we've zero'ed out the relevant space, why do we need to force the page
to read in from disk again?  (In fact, if we want to avoid forcing the
whole punched region to be written to disk, we'll need to get rid of
the ClearPageUptodate() sooner or later --- and I'm not sure I see why
it's needed now.  Am I missing something?)

					- Ted

  reply	other threads:[~2011-08-22  2:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21  2:29 [PATCH 0/6 v5] ext4: fix 1k block bugs Allison Henderson
2011-08-21  2:29 ` [PATCH 1/6 v5] ext4: Add new ext4_discard_partial_page_buffers routines Allison Henderson
2011-08-22  2:38   ` Ted Ts'o [this message]
2011-08-22 14:33     ` Allison Henderson
2011-08-21  2:29 ` [PATCH 2/6 v5] ext4: fix xfstests 75, 112, 127 punch hole failure Allison Henderson
2011-08-21  2:29 ` [PATCH 3/6 v5] ext4: fix 2nd xfstests " Allison Henderson
2011-08-21  2:29 ` [PATCH 4/6 v5] ext4: Correct large hole offset calcuation Allison Henderson
2011-08-22 15:50   ` Eric Sandeen
2011-08-22 17:19     ` Allison Henderson
2011-08-21  2:29 ` [PATCH 5/6 v5] ext4: fix fsx truncate failure Allison Henderson
2011-08-23  2:36   ` Ted Ts'o
2011-08-23  2:51     ` Allison Henderson
2011-08-21  2:29 ` [PATCH 6/6 v5] ext4: fix partial page writes Allison Henderson

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=20110822023810.GA3671@thunk.org \
    --to=tytso@mit.edu \
    --cc=achender@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).