From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Yongqiang Yang <xiaoqiangnk@gmail.com>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [RESEND PATCH 2/2] ext4: ext4_inode_is_fast_symlink should use cluster size
Date: Mon, 6 Jan 2014 14:45:35 -0500 [thread overview]
Message-ID: <20140106194535.GA28490@thunk.org> (raw)
In-Reply-To: <E2CB8B2A-38FD-4509-BCEF-DDF23ABA01AC@dilger.ca>
On Mon, Jan 06, 2014 at 10:47:03AM -0700, Andreas Dilger wrote:
> What about the idea to stop using the blocks count for doing the
> fast/slow symlink check, and instead use i_size? IMHO this is far
> more robust than using the blocks count, since we've repeatedly seen
> bugs when the number of blocks allocated to an inode changes for
> done reason (e.g. xattrs, bigalloc, multi-block xattrs in the
> future).
I did see your earlier proposal on this front, but I didn't want to
this change without thinking about it a bit more closely. In
particular, we probably would want to enforce this change in e2fsck
for a while first.
Currently, if we have a slow symlink where i_size is less than 60
bytes, both e2fsprogs and the kernel handles this case. See the
attached file system image.
Yes, I created it synthetically, but keep in mind that that there are
other implementations of ext2/3/4 other than just in the Linux kernel.
In particular, the GNU Hurd and *BSD have their own independent
implementation of ext2. So even if the Linux kernel has never created
a slow symlink with i_size <= 60 bytes, but that doesn't mean that
it's for certain that there are no such implementations out there in the wild.
That doesn't mean that we should never make such a change, but it does
mean that it's not something I want to do lightly.
- Ted
prev parent reply other threads:[~2014-01-06 19:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1387515880-10185-1-git-send-email-yangyongqiang01@baidu.com>
2013-12-20 5:11 ` Fwd: [RESEND PATCH 1/2] ext4: fix a typo in extents.c Yongqiang Yang
2013-12-20 5:11 ` Yongqiang Yang
2013-12-23 12:17 ` Carlos Maiolino
2014-01-06 14:52 ` Theodore Ts'o
[not found] ` <1387515880-10185-2-git-send-email-yangyongqiang01@baidu.com>
2013-12-20 5:13 ` Fwd: [RESEND PATCH 2/2] ext4: ext4_inode_is_fast_symlink should use cluster size Yongqiang Yang
2013-12-23 12:17 ` Carlos Maiolino
2013-12-23 19:33 ` Andreas Dilger
2014-01-06 14:51 ` Fwd: " Theodore Ts'o
2014-01-06 17:47 ` Andreas Dilger
2014-01-06 19:45 ` Theodore Ts'o [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=20140106194535.GA28490@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=xiaoqiangnk@gmail.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.