From: Eric Biggers <ebiggers@google.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>, Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH] ext4: fix reading new encrypted symlinks on no-journal filesystems
Date: Mon, 21 Nov 2016 15:19:24 -0800 [thread overview]
Message-ID: <20161121231924.GG30672@google.com> (raw)
In-Reply-To: <75C88E0E-FF89-4D20-B11C-8F705E249BDD@dilger.ca>
On Fri, Nov 18, 2016 at 02:52:22PM -0700, Andreas Dilger wrote:
>
> > Yes, this would be a much nicer way to detect fast symlinks.
> >
> > The only thing I'd be concerned about is the possibility of pre-existing
> > "slow" symlinks that actually have targets short enough to be "fast"
> > symlinks, perhaps in filesystems created by old drivers or by external
> > tools. If such links happened to work before, then a change to check
> > i_size would break them.
> >
> > This may not be an issue in practice. I checked some old ext4 versions,
> > ext2 from Linux 0.99.7, e2fsprogs, Android's ext4_utils, and FreeBSD's
> > ext2 driver.
> > They all create "fast" symlinks if the length of the symlink target length
> > excluding the terminating null (i_size) is < 60.
>
> I did a similar analysis with similar results.
>
Ted, what would you say about Andreas' suggestion to use i_size to distinguish
fast symlinks from slow symlinks?
It looks like this was discussed some years ago but the discussion died out and
no change was made: see https://www.spinics.net/lists/linux-ext4/msg05693.html
Given the investigation I did it seems it would very likely be safe, but we can
never be 100% sure it won't break some obscure tool or (version of a tool) to
create symlinks on ext2/ext3/ext4 filesystems we don't know about.
Eric
next prev parent reply other threads:[~2016-11-21 23:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 17:50 [PATCH] ext4: fix reading new encrypted symlinks on no-journal filesystems Eric Biggers
2016-11-18 2:20 ` Andreas Dilger
2016-11-18 18:47 ` Eric Biggers
2016-11-18 21:52 ` Andreas Dilger
2016-11-21 23:19 ` Eric Biggers [this message]
2016-11-22 22:49 ` Andreas Dilger
2016-12-01 19:27 ` Theodore Ts'o
2016-12-01 19:57 ` Eric Biggers
2016-12-02 17:14 ` [PATCH] ext4: fix reading new encrypted symlinks on no-journal file systems Theodore Ts'o
2016-12-02 18:05 ` Eric Biggers
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=20161121231924.GG30672@google.com \
--to=ebiggers@google.com \
--cc=adilger@dilger.ca \
--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 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).