linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] e2fsprogs: Handle rec_len correctly for 64KB blocksize
Date: Sat, 10 Nov 2007 19:37:03 -0500	[thread overview]
Message-ID: <20071111003703.GA14815@thunk.org> (raw)
In-Reply-To: <20071107160939.GF22214@duck.suse.cz>

On Wed, Nov 07, 2007 at 05:09:39PM +0100, Jan Kara wrote:

> Subject: Support for 64KB blocksize in ext2-4 directories.
> 
> When block size is 64KB, we have to take care that rec_len does not overflow.
> Kernel stores 0xffff in case 0x10000 should be stored - perform appropriate
> conversion when reading from / writing to disk.

NACK.  You can't do the conversion in the reader/writer routines
because the fundamentally rec_len is only a 16 bit field.  So when you
read a directory block where the rec_len field is encoded as 0xFFFF,
and you translate it to 0x10000, when you assign it to
dirent->rec_len, the 0x10000 gets chopped off and rec_len gets a value
of zero.  Did you test this patch before submitting it?

The only way to do this is to find all of the places that reference
rec_len, and do the check there.

						- Ted

  reply	other threads:[~2007-11-11  0:41 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 [this message]
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
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=20071111003703.GA14815@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --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).