Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Data in direntry (dirdata) feature
@ 2026-06-10 15:24 Artem Blagodarenko
  2026-06-10 15:24 ` [PATCH v2 01/10] ext4: replace ext4_dir_entry with ext4_dir_entry_2 Artem Blagodarenko
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Artem Blagodarenko @ 2026-06-10 15:24 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger.kernel, Artem Blagodarenko, Andreas Dilger, syzbot

EXT4 currently stores a hash in the directory entry
(dirent) immediately after the file name to support
simultaneous fscrypt and casefold functionality.

It has been discussed within the EXT4 community that
this hash could instead be stored in dirdata. This
would make it the second (or third, in the case of
64-bit inode counts) user of dirdata.

At the same time, the existing format—where the hash
is placed after the file name—must continue to be
supported. With these patches, EXT4 can handle the
hash in both formats.

The first user of this feature is  LUFID -
Locally Unique File ID.

Support for fscrypt and case-insensitive directories
with dirdata enabled has been verified using a
dedicated xfstest submitted to the xfstests list as
a separate patch.

e2fsprogs support is provided in a separate patches
series.

Changes in v2:
- Split the patch set into 10 smaller patchesfor
  easier reading and review.
- Added an IOCTL to set the LUFID for testing purposes.
  LUFIDs can be listed via debugfs. Corresponding support
  has been added in the related e2fsprogs series.
- Removed the dirdata mount option.
- Fixed the following issue:
  KASAN: slab-out-of-bounds read in __ext4_check_dir_entry
- Rebased onto the latest codebase.

Artem Blagodarenko (10):
  ext4: replace ext4_dir_entry with ext4_dir_entry_2
  ext4: add ext4_dir_entry_is_tail()
  ext4: refactor dx_root to support variable dirent sizes
  ext4: add dirdata format definitions and access helpers
  ext4: preserve dirdata bits in get_dtype()
  ext4: add ext4_dir_entry_len() and harden dirdata parsing
  ext4: rename ext4_dir_rec_len() and clarify dirdata usage
  ext4: dirdata feature
  ext4: add dirdata set/get helpers
  ext4: Add EXT4_IOC_SET_LUFID ioctl for setting LUFID on directory
    entries

 foofile.txt               |   0
 fs/ext4/dir.c             |   9 +-
 fs/ext4/ext4.h            | 205 ++++++++++++-
 fs/ext4/inline.c          |  37 ++-
 fs/ext4/ioctl.c           |  62 ++++
 fs/ext4/namei.c           | 587 +++++++++++++++++++++++++++-----------
 fs/ext4/sysfs.c           |   2 +
 include/uapi/linux/ext4.h |  13 +
 8 files changed, 723 insertions(+), 192 deletions(-)
 create mode 100644 foofile.txt

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Tested-by: syzbot@syzkaller.appspotmail.com
-- 
2.43.7


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/3] Data in direntry (dirdata) feature
@ 2026-04-17 21:37 Artem Blagodarenko
  2026-04-18  6:47 ` [syzbot ci] " syzbot ci
  0 siblings, 1 reply; 13+ messages in thread
From: Artem Blagodarenko @ 2026-04-17 21:37 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger.kernel, Artem Blagodarenko

EXT4 currently stores a hash in the directory entry
(dirent) immediately after the file name to support
simultaneous fscrypt and casefold functionality.

It has been discussed within the EXT4 community that
this hash could instead be stored in dirdata. This
would make it the second (or third, in the case of
64-bit inode counts) user of dirdata.

At the same time, the existing format—where the hash
is placed after the file name—must continue to be
supported. With these patches, EXT4 can handle the
hash in both formats.

The first user of this feature, LUFID, has been
tested in the Lustre filesystem backend (LDISKFS)
[1].

Support for fscrypt and case-insensitive directories
with dirdata enabled has been verified using a
dedicated xfstest submitted to the EXT4 community as
a separate patch.

e2fsprogs support is provided in a separate patch.

[1] https://review.whamcloud.com/c/fs/lustre-release/+/64439

Artem Blagodarenko (3):
  ext4: make dirdata work with metadata_csum
  ext4: add dirdata support structures and helpers
  ext4: dirdata feature

 fs/ext4/dir.c    |   9 +-
 fs/ext4/ext4.h   | 169 +++++++++++++++++++--
 fs/ext4/inline.c |  22 +--
 fs/ext4/namei.c  | 379 ++++++++++++++++++++++++++++++-----------------
 fs/ext4/super.c  |   4 +-
 fs/ext4/sysfs.c  |   2 +
 6 files changed, 422 insertions(+), 163 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-06-11 10:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 15:24 [PATCH v2 00/10] Data in direntry (dirdata) feature Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 01/10] ext4: replace ext4_dir_entry with ext4_dir_entry_2 Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 02/10] ext4: add ext4_dir_entry_is_tail() Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 03/10] ext4: refactor dx_root to support variable dirent sizes Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 04/10] ext4: add dirdata format definitions and access helpers Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 05/10] ext4: preserve dirdata bits in get_dtype() Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 06/10] ext4: add ext4_dir_entry_len() and harden dirdata parsing Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 07/10] ext4: rename ext4_dir_rec_len() and clarify dirdata usage Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 08/10] ext4: dirdata feature Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 09/10] ext4: add dirdata set/get helpers Artem Blagodarenko
2026-06-10 15:24 ` [PATCH v2 10/10] ext4: Add EXT4_IOC_SET_LUFID ioctl for setting LUFID on directory entries Artem Blagodarenko
2026-06-11 10:29 ` [syzbot ci] Re: Data in direntry (dirdata) feature syzbot ci
  -- strict thread matches above, loose matches on Subject: below --
2026-04-17 21:37 [PATCH 0/3] " Artem Blagodarenko
2026-04-18  6:47 ` [syzbot ci] " syzbot ci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox