From: Theodore Tso <tytso@mit.edu>
To: Wei Yongjun <yjwei@cn.fujitsu.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Fix to read empty directory blocks correctly in 64k blocksize filesystems
Date: Tue, 10 Feb 2009 10:20:49 -0500 [thread overview]
Message-ID: <20090210152049.GF30689@mini-me.lan> (raw)
In-Reply-To: <4990FAE4.1080009@cn.fujitsu.com>
This is a good patch, but the patch description doesn't tell the
complete tale. I've replaced it with the following.
- Ted
ext4: Fix to read empty directory blocks correctly in 64k
From: Wei Yongjun <yjwei@cn.fujitsu.com>
The rec_len field in the directory entry is 16 bits, so there was a
problem representing rec_len for filesystems with a 64k block size in
the case where the directory entry takes the entire 64k block.
Unfortunately, there were two schemes that were proposed; one where
all zeros meant 65536 and one where all ones (65535) meant 65536.
E2fsprogs used 0, whereas the kernel used 65535. Oops. Fortunately
this case happens extremely rarely, with the most common case being
the lost+found directory, created by mke2fs.
So we will be liberal in what we accept, and accept both encodings,
but we will continue to encode 65536 as 65535. This will require a
change in e2fsprogs, but with fortunately ext4 filesystems normally
have the dir_index feature enabled, which precludes having a
completely empty directory block.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
next prev parent reply other threads:[~2009-02-10 18:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 3:56 [PATCH] ext4: Fix to read empty directory blocks correctly in 64k blocksize filesystems Wei Yongjun
2009-02-10 8:26 ` [PATCHv2] ext4: Fix support for empty directory blocks " Wei Yongjun
2009-02-10 15:20 ` Theodore Tso [this message]
2009-02-11 5:48 ` [PATCH] ext4: Fix to read empty directory blocks correctly " Andreas Dilger
2009-02-11 15:15 ` Theodore Tso
2009-02-12 6:42 ` Wei Yongjun
2009-02-15 4:07 ` Theodore Tso
2009-02-16 23:32 ` Andreas Dilger
2009-02-17 0:05 ` Theodore Tso
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=20090210152049.GF30689@mini-me.lan \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=yjwei@cn.fujitsu.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.