All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Henderson <achender@linux.vnet.ibm.com>
To: "Ted Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/6 v5] ext4: Add new ext4_discard_partial_page_buffers routines
Date: Mon, 22 Aug 2011 07:33:03 -0700	[thread overview]
Message-ID: <4E52689F.70606@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110822023810.GA3671@thunk.org>

On 08/21/2011 07:38 PM, Ted Ts'o wrote:
> 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

Oh, I see, maybe we can take this out now then.  Initially we put this 
in there when all we were doing was unmapping the buffer heads.  The 
idea was that if we just unmap the buffer heads and set the page not 
uptodate we wouldnt have to zero the page, but since that didnt work out 
for the mapped reads, we added the zeroing back in.  I'll run some more 
tests to see if we can take it out.  Thx!

Allison Henderson

  reply	other threads:[~2011-08-22 14:33 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
2011-08-22 14:33     ` Allison Henderson [this message]
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=4E52689F.70606@linux.vnet.ibm.com \
    --to=achender@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.