From: Andreas Dilger <adilger@whamcloud.com>
To: Ted Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] tests: add test for symlink extent
Date: Tue, 10 Apr 2012 23:06:50 -0600 [thread overview]
Message-ID: <1AA51704-1130-44B6-A891-203FDCDBF83D@whamcloud.com> (raw)
In-Reply-To: <20120411034547.GD12044@thunk.org>
On 2012-04-10, at 9:45 PM, Ted Ts'o wrote:
> On Tue, Apr 10, 2012 at 03:34:17PM -0600, Andreas Dilger wrote:
>> Long symlinks with the EXT4_EXTENTS_FL set may have been created at
>> one time due to the EXTENTS_FL being inherited from the parent dir.
>> While the original cause of such symlinks has been fixed in the
>> upstream kernel commit 2dc6b0d48ca0599837df21b14bb8393d0804af57,
>> such symlinks may still exist in the wild.
>
> Huh? We're still creating long symlinks with extents, and I'm not
> sure why this would be a problem. I don't mind a test for it, but it
> seems strange that (a) you think e2fsprogs wouldn't be able to deal
> with it, and (b) that we aren't doing it any more. I just tested with
> a 3.3 kernel with the patches from the ext4's 3.4 merge window, and it
> created a symlink with an extent.
My bad. I had examined some symlinks on an ext4 filesystem to see if they had the EXT4_EXTENTS_FL set, but didn't think to check long symlinks, so I assumed this was an anachronism and rewrote the patch description while submitting it... Originally it read:
Long symlinks with the EXT4_EXTENTS_FL set should no longer be
considered as corrupt, since these are created by default with
new kernels using ext4 as the filesystem type. This has not
impacted Lustre in the past because extents are only enabled on
the OST, while symlinks are only created on the MDT where extents
are never enabled.
However, now that distros are using ext4 as the base filesystem
type, if the lustre-patched e2fsprogs RPM is installed it will
incorrectly consider all such long symlinks as bad and remove them.
We had previously hit problems with Lustre e2fsprogs because we originally flagged such symlinks as errors, and there was no existing test which had such a symlink. The description clearly wasn't useful for upstream submission, but the test is still useful.
Cheers, Andreas
> See line 872 of fs/ext4/ialloc.c:
>
> if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
> /* set extent flag only for directory, file and normal symlink*/
> if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) {
> ext4_set_inode_flag(inode, EXT4_INODE_EXTENTS);
> ext4_ext_tree_init(handle, inode);
> }
> }
>
> - Ted
Cheers, Andreas
--
Andreas Dilger Whamcloud, Inc.
Principal Lustre Engineer http://www.whamcloud.com/
next prev parent reply other threads:[~2012-04-11 5:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 21:34 [PATCH] tests: add test for symlink extent Andreas Dilger
2012-04-11 3:45 ` Ted Ts'o
2012-04-11 5:06 ` Andreas Dilger [this message]
2012-04-11 18:07 ` Ted Ts'o
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=1AA51704-1130-44B6-A891-203FDCDBF83D@whamcloud.com \
--to=adilger@whamcloud.com \
--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 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.