archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <>
To: Eric Biggers <>
Cc:,,,,, Al Viro <>
Subject: Re: [PATCH v2 2/2] fscrypt: cache decrypted symlink target in ->i_link
Date: Wed, 17 Apr 2019 12:55:56 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, Apr 10, 2019 at 01:21:15PM -0700, Eric Biggers wrote:
> From: Eric Biggers <>
> Path lookups that traverse encrypted symlink(s) are very slow because
> each encrypted symlink needs to be decrypted each time it's followed.
> This also involves dropping out of rcu-walk mode.
> Make encrypted symlinks faster by caching the decrypted symlink target
> in ->i_link.  The first call to fscrypt_get_symlink() sets it.  Then,
> the existing VFS path lookup code uses the non-NULL ->i_link to take the
> fast path where ->get_link() isn't called, and lookups in rcu-walk mode
> remain in rcu-walk mode.
> Also set ->i_link immediately when a new encrypted symlink is created.
> To safely free the symlink target after an RCU grace period has elapsed,
> introduce a new function fscrypt_free_inode(), and make the relevant
> filesystems call it just before actually freeing the inode.
> Cc: Al Viro <>
> Signed-off-by: Eric Biggers <>

Looks good, applied.

					- Ted

      reply	other threads:[~2019-04-17 16:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 20:21 [PATCH v2 0/2] fscrypt: improve encrypted symlink performance Eric Biggers
2019-04-10 20:21 ` [PATCH v2 1/2] vfs: use READ_ONCE() to access ->i_link Eric Biggers
2019-04-10 21:06   ` Al Viro
2019-04-10 23:15     ` Eric Biggers
2019-04-11  2:25       ` Al Viro
2019-04-11 17:28         ` Eric Biggers
2019-04-17 16:41         ` Theodore Ts'o
2019-04-10 20:21 ` [PATCH v2 2/2] fscrypt: cache decrypted symlink target in ->i_link Eric Biggers
2019-04-17 16:55   ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* 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).