From: Andreas Dilger <adilger@sun.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Theodore Tso <tytso@mit.edu>, Eric Sandeen <sandeen@redhat.com>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: e2fsprogs and fast symlink
Date: Mon, 24 Mar 2008 14:45:10 -0600 [thread overview]
Message-ID: <20080324204510.GH2691@webber.adilger.int> (raw)
In-Reply-To: <20080324113747.GA18042@skywalker>
On Mar 24, 2008 17:07 +0530, Aneesh Kumar K.V wrote:
> @@ -204,6 +204,14 @@ void ext4_delete_inode (struct inode * inode)
> if (inode->i_blocks)
> ext4_truncate(inode);
> +
> + /*
> + * In case of link clear the extent flag. Fast symlinks are not
> + * stored in extent format we use i_blocks count to determine
> + * whether it is fast link or not.
> + */
> + if (S_ISLNK(inode->i_mode))
> + EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL;
This is a big hack I think. It shouldn't matter to e2fsck whether a
deleted long symlink is in extent format or not, and clearing the flag
like this would make it harder to undelete this symlink if needed. This
should be fixed in e2fsck and not the kernel.
Also, it is (IMHO) a hack that we use the i_blocks count to determine
if a symlink is fast or slow. That is what caused the breakage when
EAs on symlinks were added, and if we add extra blocks to symlinks for
some other reason (e.g. more than a single EA block, or other) it will
break again.
Instead I propose that we just use the i_size itself to determine if
there is a fast symlink, because there has never (AFAIK) been a kernel
that created slow symlinks for files < 60 bytes in length.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2008-03-24 20:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-21 11:42 e2fsprogs and fast symlink Aneesh Kumar K.V
2008-03-24 11:37 ` Aneesh Kumar K.V
2008-03-24 20:45 ` Andreas Dilger [this message]
2008-03-24 21:26 ` Theodore Tso
2008-03-25 0:40 ` Andreas Dilger
2008-03-24 12:20 ` [E2FSPROGS, PATCH] e2fsck: Don't object to extents flags on deleted fast symlinks Theodore Ts'o
2008-03-24 12:25 ` e2fsprogs and fast symlink Christian Kujau
2008-03-24 12:36 ` Theodore Tso
2008-03-24 13:18 ` Christian Kujau
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=20080324204510.GH2691@webber.adilger.int \
--to=adilger@sun.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--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