Whamcloud - gitweb
LU-17658 fid: check on disk sequence before allocating to osp 74/54474/12
authorLi Dongyang <dongyangli@ddn.com>
Wed, 20 Mar 2024 23:09:34 +0000 (10:09 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:03:56 +0000 (04:03 +0000)
commit373b76b345b5eaa21b201315075f01ccfc408189
tree828d6460436c79cc04699e99760856e200d37085
parent33442e0cab14fd2a7896dc7ace5ff61f1874da6b
LU-17658 fid: check on disk sequence before allocating to osp

If we lose the commit to update seq_srv on ofd/ost, the available
super-sequence range is not updated, the sequence server of ofd
could assign the same sequence again to a different osp,
creating filesystem corruption.

To address this, a new dt_device_operations->dt_last_seq_get()
is added to iterate the current known sequence dirs under /O
and return the latest one. Before using the super-sequence range
read from seq_srv we use the new interface to double check and
update the current range or get a new range if necessary.

Change-Id: I49a11bb3b5e476e55c5835b05392c9567aeeb4ce
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54474
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/fid/fid_handler.c
lustre/fid/fid_store.c
lustre/include/dt_object.h
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-ldiskfs/osd_scrub.h
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_scrub.c