linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Andreas Dilger <adilger@clusterfs.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>, hooanon05@yahoo.co.jp
Subject: Re: [RFC][PATCH] ensure do_split leaves enough free space in both blocks
Date: Mon, 17 Sep 2007 10:51:05 -0500	[thread overview]
Message-ID: <46EEA269.6020709@redhat.com> (raw)
In-Reply-To: <20070917054817.GG2990@schatzie.adilger.int>

Andreas Dilger wrote:
> On Sep 15, 2007  22:46 -0500, Eric Sandeen wrote:
>> * calculate the minimum rec_len when generating the map, vs.
>>   just storing the current rec_len.
> 
> Well, we already do this when moving the entries, so in theory we
> should do it when checking how many entries to move.  That said,
> we know we can't _increase_ the amount of space used (so no chance
> of introducing a problem) but we might still end up with some imbalance.

I think I'm going to pass on this, at least for now, to save the extra
calculation.  We've lived for years with whatever split the original
code gave us, and with the exception of this overflow, we've not seen
problems.  Splitting based on rec_len (vs. EXT3_DIR_REC_LEN) should
still split things fairly well, on average.

If we used EXT3_DIR_REC_LEN)(name_len) for the new tests, I think we'd
first need to add up the minimal size of *all* entries, because the new
threshold would no longer be blocksize/2.  So, this would be more times
around the loop.

If anyone feels strongly that we should make this split as accurate as
possible, I'm willing to patch that up too, but for now I think I'd like
to get the more targeted fix in place, as it should solve the bug at
hand in a simpler manner.

Sound ok?

-Eric

      parent reply	other threads:[~2007-09-17 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-16  3:46 [RFC][PATCH] ensure do_split leaves enough free space in both blocks Eric Sandeen
2007-09-17  5:48 ` Andreas Dilger
2007-09-17 12:17   ` Eric Sandeen
2007-09-17 15:51   ` Eric Sandeen [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=46EEA269.6020709@redhat.com \
    --to=sandeen@redhat.com \
    --cc=adilger@clusterfs.com \
    --cc=hooanon05@yahoo.co.jp \
    --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).