Whamcloud - gitweb
LU-16610 ldiskfs: fix directory corruption on openeuler 22.03
This fixes directory corruption error below.
LDISKFS-fs error (device dm-0): ldiskfs_find_dest_de:2412: inode
rec_len is smaller than minimal - offset=0, inode=0, rec_len=8,
name_len=0, size=4096
Fixes through
make up(&ei->i_append_sem) lock include ext4_journal_get_write_access()
like rhel9.1 ext4-pdirop.patch.
Remove the wrong the dx_move_dirents() call before condition "if
(hinfo->hash < hash2)" like other ext4-pdirop.patch.
Also move code part
if (indirect == level) { /* the last index level */
struct ext4_dir_lock_data *ld;
u64 myblock;
...
}
after code part
block = dx_get_block(at);
for (i = 0; i <= level; i++) {
...
}
Change-Id: Ie33623ba4428d58f5c612871287c19e7e239755d
Test-Parameters: trivial
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50192
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>