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)
committerLi Dongyang <dongyangli@ddn.com>
Wed, 15 Aug 2018 02:08:04 +0000 (12:08 +1000)
commit05a458b3552fda8f104bf8d5298692a974ab3f8e
treecf7339af01cf69c622b2e581fd3352811abcd3cb
parent91819cd70924d2654b9328490b9c7f93f69d7d74
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.

Include this patches:

e2fsck: e2fsck -D does not change dirdata content

Fix dir optimization to preserve dirdata content for dot
and dotdot entries.

Lustre-bug: https://jira.hpdd.intel.com/browse/LU-1774
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Iae190794da75a2080a8e5cc5b95a49e0c894f72f

e2fsprogs: Consider DIRENT_LUFID flag in link_proc().

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: https://jira.hpdd.intel.com/browse/LU-2462
Signed-off-by: Manisha Salve <msalve@ddn.com>
Change-Id: Ic593c558c47a78183143ec8e99d8385ac94d06f7

libext2fs, e2fsck: don't use ext2_dir_entry_2

Due to endian issues, do not use ext2_dir_entry_2 because it will
have the wrong byte order on directory entries that are swabbed.
Instead, use the standard practice of mask-and-shift to access the
file_type and dirdata flags.

Lustre-bug: https://jira.hpdd.intel.com/browse/LU-4677
Signed-off-by: Pravin Shelar <pravin@clusterfs.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
27 files changed:
debugfs/htree.c
debugfs/ls.c
e2fsck/pass1.c
e2fsck/pass2.c
e2fsck/pass3.c
e2fsck/problem.c
e2fsck/problem.h
e2fsck/rehash.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]