Whamcloud - gitweb
e2fsck: add support for dirdata feature
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 17 May 2018 03:43:16 +0000 (13:43 +1000)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Dec 2022 18:49:58 +0000 (11:49 -0700)
commit1712f97cd6b8dcb47817ed443f390d311fe79f68
tree21da37e75eea442485307243a7c5df6a55284d20
parentac8756def6934befc6f8491e7a6706d4b165b1af
e2fsck: add support for dirdata feature

Add support for the INCOMPAT_DIRDATA feature, which allows
storing extra data in the directory entry beyond the name.
This allows the Lustre File IDentifier to be accessed in
an efficient manner, and would be useful for expanding a
filesystem to allow more than 2^32 inodes in the future.

While adding the new file entry in directory block, link_proc()
calculates minimum record length of the existing directory entry
without considering the dirent data size and which leads to
corruption. Changed the code to use EXT2_DIR_REC_LEN() which will
return correct record length including dirent data size.

Lustre-bug-id: https://jira.hpdd.intel.com/browse/LU-4677
Signed-off-by: Pravin Shelar <pravin@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
31 files changed:
debugfs/debugfs.8.in
debugfs/htree.c
debugfs/ls.c
debugfs/ncheck.c
e2fsck/message.c
e2fsck/pass1.c
e2fsck/pass2.c
e2fsck/pass3.c
e2fsck/problem.c
e2fsck/problem.h
e2fsck/rehash.c
e2fsck/unix.c
lib/ext2fs/dirblock.c
lib/ext2fs/ext2_fs.h
lib/ext2fs/ext2fs.h
lib/ext2fs/inline_data.c
lib/ext2fs/lfsck.h [new file with mode: 0644]
lib/ext2fs/link.c
lib/ext2fs/newdir.c
misc/mke2fs.c
misc/tune2fs.c
tests/f_dir_optimize/expect.1 [new file with mode: 0644]
tests/f_dir_optimize/expect.2 [new file with mode: 0644]
tests/f_dir_optimize/image.gz [new file with mode: 0644]
tests/f_dir_optimize/name [new file with mode: 0644]
tests/f_dir_optimize/script [new file with mode: 0644]
tests/f_dirdata_optimize/expect.1 [new file with mode: 0644]
tests/f_dirdata_optimize/expect.2 [new file with mode: 0644]
tests/f_dirdata_optimize/image.gz [new file with mode: 0644]
tests/f_dirdata_optimize/name [new file with mode: 0644]
tests/f_dirdata_optimize/script [new file with mode: 0644]