Whamcloud - gitweb
LU-14470 dne: striped mkdir replay by client request 85/47385/22
authorLai Siyao <lai.siyao@whamcloud.com>
Sun, 21 Nov 2021 09:53:09 +0000 (04:53 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 28 Sep 2023 07:59:30 +0000 (07:59 +0000)
commita2e997f0bed0ae4cfdcf6d73f8a79e3d23d28a2f
tree1be1c76145ebf2929a17aa561c74c7d883c03454
parent7194eb6431d2ef7245ef3b13394b60e220145187
LU-14470 dne: striped mkdir replay by client request

Once all involved MDTs of a striped mkdir were rebooted, or MDT
recovery was aborted, this mkdir will be replayed by client request.
To correctly replay such mkdir, pack directory LMV in mkdir reply,
and save it to request from reply, and MDS should use this layout to
replay mkdir.

For MDT recovery abort case, the original mkdir may be partially
executed, so mkdir replay should check below cases and don't treat
them as error:
* name entry is found on parent directory on remote MDT.
* stripe exists on remote MDT.

For backward compatibility, Add MDS_MKDIR_LMV flag to indicate a
client requires directory LMV in mkdir reply.

Updated replay-single 100c since striped mkdir can replay now.

Updated recovery-small 130 since create fetches layout now.

Added replay-single 100e.

Test-Parameters: mdscount=2 mdtcount=4 testlist=racer,racer,racer,racer,racer
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: If0cc8f4aebbe55cc28786d6b4198dbb57743feb3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47385
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 files changed:
lustre/include/lustre_lmv.h
lustre/include/md_object.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lod/lod_object.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_lib.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mdd/mdd_dir.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_open.c
lustre/mdt/mdt_recovery.c
lustre/mdt/mdt_reint.c
lustre/osd-ldiskfs/osd_handler.c
lustre/ptlrpc/layout.c
lustre/tests/racer.sh [changed mode: 0644->0755]
lustre/tests/recovery-small.sh
lustre/tests/replay-single.sh