Whamcloud - gitweb
LU-15978 osp: fix striped directory deletion fails for 64K PAGE_SIZE 12/47812/33
authorXinliang Liu <xinliang.liu@linaro.org>
Tue, 28 Jun 2022 08:34:46 +0000 (08:34 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Aug 2023 05:34:16 +0000 (05:34 +0000)
commit7576d294582b818b20559138500cf1e58607cfc8
tree86ecf5fc69b898ffa5ecfc136d988f5da4056153
parent48ccf2db8495344e1d0c39f8bed0969279e29db4
LU-15978 osp: fix striped directory deletion fails for 64K PAGE_SIZE

This fixes the rmdir errors below:
rmdir: failed to remove '/mnt/lustre/d1.sanity/d2': Invalid argument
LustreError: 381691:0:(osp_object.c:1998:osp_it_next_page())
lustre-MDT0000-osp-MDT0001: invalid magic (0 != 8a6d6b6c) for page 0/1
while read layout orphan index.

For 64K PAGE_SIZE, when created an striped directory, e.g. created
with function test_mkdir() defined in test-framework.sh when MDSCOUNT
>= 2, deleting it will fail.

For PAGE_SIZE > LU_PAGE_SIZE, if the end system page fills less than
LU_PAGE_COUNT lu_idxpages, init the header of the remain lu_idxpages.
So that the clients handle this partial filling correctly.

Also make goto labels meaningful and avoid not freeing pages for
lip_nr == 0 in osp_it_next_page().

This patch also fixes wrong page idx for page kunmap in
dt_index_walk().

This server end fix also necessary for the idxpage reading clients
nodemap_process_idx_pages() and qsd_reint_entries(). So this patch also
includes fix for LU-15992: nodemap create and check failed on 64K page
size.

Fixes: 77eea1985bb1 ("LU-3336 lfsck: orphan OST-objects iteration")
Change-Id: I75bd9603c31bed8ea15fdba693677d41affaf61c
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Co-authored-by: Kevin Zhao <kevin.zhao@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47812
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
lustre/include/dt_object.h
lustre/obdclass/dt_object.c
lustre/osp/osp_object.c
lustre/ptlrpc/nodemap_storage.c