Skip to content

f2fs: rework filename handling

Eric Biggers linux-f2fs-devel linux-fscrypt stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4f2fs: don't leak filename in f2fs_try_convert_inline_dir()fs/f2fs/inline.c+4 -21 reply
2/4f2fs: split f2fs_d_compare() from f2fs_match_name()fs/f2fs/dir.c fs/f2fs/f2fs.h+35 -401 reply
3/4f2fs: rework filename handlingfs/f2fs/dir.c fs/f2fs/f2fs.h fs/f2fs/hash.c +3 more+331 -2352 replies
4/4f2fs: Handle casefolding with Encryption (INCOMPLETE)fs/f2fs/dir.c fs/f2fs/f2fs.h fs/f2fs/hash.c +1 more+79 -151 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchChao Yu
1/4R-b
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [f2fs-dev] [PATCH 0/4] f2fs: rework filename handling

This patchset reworks f2fs's handling of filenames to make it much easier to correctly implement all combinations of normal, encrypted, casefolded, and encrypted+casefolded directories. It also optimizes all filesystem operations to compute the dirhash and casefolded name only once, rather than once per directory level or directory block.

Patch 4 is RFC and shows how we can add support for encrypted+casefolded directories fairly easily after this rework -- including support for roll-forward recovery. (It's incomplete as it doesn't include the needed dentry_ops -- those can be found in Daniel's patchset
https://lkml.kernel.org/r/[email protected])

So far this is only lightly tested, e.g. with the xfstests in the 'encrypt' and 'casefold' groups. I haven't tested patch 4 yet.

Eric Biggers (4):
f2fs: don't leak filename in f2fs_try_convert_inline_dir()
f2fs: split f2fs_d_compare() from f2fs_match_name()
f2fs: rework filename handling
f2fs: Handle casefolding with Encryption (INCOMPLETE)

 fs/f2fs/dir.c      | 415 +++++++++++++++++++++++++++------------------
 fs/f2fs/f2fs.h     |  85 +++++++---
 fs/f2fs/hash.c     |  87 +++++-----
 fs/f2fs/inline.c   |  49 +++---
 fs/f2fs/namei.c    |   6 +-
 fs/f2fs/recovery.c |  61 +++++--
 6 files changed, 430 insertions(+), 273 deletions(-)
Signature · 1 line
2.26.2