linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Eric Biggers <ebiggers@kernel.org>,
	<linux-f2fs-devel@lists.sourceforge.net>
Cc: linux-fscrypt@vger.kernel.org,
	Gabriel Krisman Bertazi <krisman@collabora.com>,
	Daniel Rosenberg <drosen@google.com>
Subject: Re: [f2fs-dev] [PATCH 3/4] f2fs: rework filename handling
Date: Mon, 25 May 2020 16:12:07 +0800	[thread overview]
Message-ID: <9c18ded1-06cb-1187-1eac-5ba354eebee1@huawei.com> (raw)
In-Reply-To: <20200507075905.953777-4-ebiggers@kernel.org>

On 2020/5/7 15:59, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> Rework f2fs's handling of filenames to use a new 'struct f2fs_filename'.
> Similar to 'struct ext4_filename', this stores the usr_fname, disk_name,
> dirhash, crypto_buf, and casefolded name.  Some of these names can be
> NULL in some cases.  'struct f2fs_filename' differs from
> 'struct fscrypt_name' mainly in that the casefolded name is included.
> 
> For user-initiated directory operations like lookup() and create(),
> initialize the f2fs_filename by translating the corresponding
> fscrypt_name, then computing the dirhash and casefolded name if needed.
> 
> This makes the dirhash and casefolded name be cached for each syscall,
> so we don't have to recompute them repeatedly.  (Previously, f2fs
> computed the dirhash once per directory level, and the casefolded name
> once per directory block.)  This improves performance.
> 
> This rework also makes it much easier to correctly handle all
> combinations of normal, encrypted, casefolded, and encrypted+casefolded
> directories.  (The fourth isn't supported yet but is being worked on.)
> 
> The only other cases where an f2fs_filename gets initialized are for two
> filesystem-internal operations: (1) when converting an inline directory
> to a regular one, we grab the needed disk_name and hash from an existing
> f2fs_dir_entry; and (2) when roll-forward recovering a new dentry, we
> grab the needed disk_name from f2fs_inode::i_name and compute the hash.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2020-05-25  8:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07  7:59 [f2fs-dev] [PATCH 0/4] f2fs: rework filename handling Eric Biggers
2020-05-07  7:59 ` [f2fs-dev] [PATCH 1/4] f2fs: don't leak filename in f2fs_try_convert_inline_dir() Eric Biggers
2020-05-08  8:25   ` Chao Yu
2020-05-07  7:59 ` [f2fs-dev] [PATCH 2/4] f2fs: split f2fs_d_compare() from f2fs_match_name() Eric Biggers
2020-05-11  2:47   ` Chao Yu
2020-05-07  7:59 ` [f2fs-dev] [PATCH 3/4] f2fs: rework filename handling Eric Biggers
2020-05-25  8:12   ` Chao Yu [this message]
2020-05-25 15:10     ` Jaegeuk Kim
2020-05-07  7:59 ` [f2fs-dev] [RFC PATCH 4/4] f2fs: Handle casefolding with Encryption (INCOMPLETE) Eric Biggers
2020-05-08  2:55   ` Eric Biggers
2020-05-07 13:09 ` [f2fs-dev] [PATCH 0/4] f2fs: rework filename handling Jaegeuk Kim

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=9c18ded1-06cb-1187-1eac-5ba354eebee1@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=drosen@google.com \
    --cc=ebiggers@kernel.org \
    --cc=krisman@collabora.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    /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).