From: Andreas Dilger <adilger@sun.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] e2fsprogs: Handle rec_len correctly for 64KB blocksize
Date: Tue, 13 Nov 2007 08:08:36 -0700 [thread overview]
Message-ID: <20071113150836.GM3966@webber.adilger.int> (raw)
In-Reply-To: <20071112145823.GB17462@thunk.org>
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
On Nov 12, 2007 09:58 -0500, Theodore Tso wrote:
> On Mon, Nov 12, 2007 at 10:52:45AM +0100, Jan Kara wrote:
> > > Did you test this patch before submitting it?
> >
> > Argh, stupid me. I've just tested that I didn't break anything for normal
> > block size and thought that I cannot make mistake in such a simple thing
> > ;).
>
> Could I ask you to perhaps include some 64k blocksize test cases that
> would exercise the new codepaths?
One thing I had done to verify that 64kB rec_len was broken was to always
create lost+found with at least 2 disk blocks, since the second block in
lost+found will not have any dirents in it and will tickle this bug.
Patch attached.
Cheers, Andreas
--
Andreas Dilger
Sr. Software Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
[-- Attachment #2: e2fsprogs-large_lpf.patch --]
[-- Type: text/plain, Size: 609 bytes --]
Index: e2fsprogs-cfs/misc/mke2fs.c
===================================================================
--- e2fsprogs-cfs.orig/misc/mke2fs.c
+++ e2fsprogs-cfs/misc/mke2fs.c
@@ -551,7 +551,10 @@ static void create_lost_and_found(ext2_f
}
for (i=1; i < EXT2_NDIR_BLOCKS; i++) {
- if ((lpf_size += fs->blocksize) >= 16*1024)
+ /* Ensure that lost+found is at least 2 blocks, so we always
+ * test large empty blocks for big-block filesystems. */
+ if ((lpf_size += fs->blocksize) >= 16*1024 &&
+ lpf_size >= 2 * fs->blocksize)
break;
retval = ext2fs_expand_dir(fs, ino);
if (retval) {
next prev parent reply other threads:[~2007-11-13 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071106113142.GA23689@duck.suse.cz>
2007-11-07 16:09 ` [PATCH] e2fsprogs: Handle rec_len correctly for 64KB blocksize Jan Kara
2007-11-11 0:37 ` Theodore Tso
2007-11-12 9:52 ` Jan Kara
2007-11-12 14:58 ` Theodore Tso
2007-11-12 16:10 ` Jan Kara
2007-11-13 15:08 ` Andreas Dilger [this message]
2007-12-06 14:11 Jan Kara
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=20071113150836.GM3966@webber.adilger.int \
--to=adilger@sun.com \
--cc=jack@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).