public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Mingming Cao <cmm@us.ibm.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: zero out small extents when writing to prealloc	area.
Date: Tue, 04 Mar 2008 23:45:17 -0700	[thread overview]
Message-ID: <20080305064517.GB3616@webber.adilger.int> (raw)
In-Reply-To: <1204678288.3605.15.camel@localhost.localdomain>

On Mar 04, 2008  16:51 -0800, Mingming Cao wrote:
> On Tue, 2008-03-04 at 18:16 +0530, Aneesh Kumar K.V wrote:
> > +	/* If extent has less than 2*EXT4_EXT_ZERO_LEN zerout directly */
> > +	if (ee_len <= 2*EXT4_EXT_ZERO_LEN) {
> 
> Hmm, here this is range is extended to 2*EXT4_EXT_ZERO_LEN? I am a
> little more biased to keep the threshold constant as EXT4_EXT_ZERO_LEN
> around all places...

I initially thoguht this also, but it makes sense.  If the extent is
<= 2x EXT4_EXT_ZERO_LEN and it is split anywhere then the resulting
parts will be < EXT4_EXT_ZERO_LEN themselves, unless split is very
close to one edge.  Even then it is better to keep a single initialized
extent instead of 3 different ones.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


      reply	other threads:[~2008-03-05  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 12:46 [PATCH] ext4: zero out small extents when writing to prealloc area Aneesh Kumar K.V
2008-03-05  0:51 ` Mingming Cao
2008-03-05  6:45   ` Andreas Dilger [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=20080305064517.GB3616@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox