From: Andrew Morton <akpm@linux-foundation.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>,
ext4 development <linux-ext4@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
hooanon05@yahoo.co.jp, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH] ext34: ensure do_split leaves enough free space in both blocks
Date: Mon, 17 Sep 2007 13:30:20 -0700 [thread overview]
Message-ID: <20070917133020.5fc4650c.akpm@linux-foundation.org> (raw)
In-Reply-To: <46EEB7A4.9040903@sandeen.net>
On Mon, 17 Sep 2007 12:21:40 -0500
Eric Sandeen <sandeen@sandeen.net> wrote:
> Eric Sandeen wrote:
> > The do_split() function for htree dir blocks is intended to split a
> > leaf block to make room for a new entry. It sorts the entries in the
> > original block by hash value, then moves the last half of the entries to
> > the new block - without accounting for how much space this actually moves.
> > (IOW, it moves half of the entry *count* not half of the entry *space*).
> > If by chance we have both large & small entries, and we move only the
> > smallest entries, and we have a large new entry to insert, we may not have
> > created enough space for it.
>
> (btw, the upshot of this is that in add_dirent_to_buf(),
> memcpy(de->name, name, namelen) will overshoot the buffer and actually
> corrupt memory.)
Nice!
So this looks like 2.6.22 and 2.6.23 material, but the timing is getting
pretty squeezy. Could people please give this change an extra-close
review, let me know?
Thanks.
next prev parent reply other threads:[~2007-09-17 20:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 16:06 [PATCH] ext34: ensure do_split leaves enough free space in both blocks Eric Sandeen
2007-09-17 17:21 ` Eric Sandeen
2007-09-17 20:30 ` Andrew Morton [this message]
2007-09-17 20:57 ` Andreas Dilger
2007-09-18 0:16 ` hooanon05
2007-09-18 17:41 ` Stephen C. Tweedie
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=20070917133020.5fc4650c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hooanon05@yahoo.co.jp \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
--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