Whamcloud - gitweb
LU-17334 lov: handle object created on newly added OST 35/53335/8
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 5 Dec 2023 20:45:44 +0000 (12:45 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 Dec 2023 01:58:13 +0000 (01:58 +0000)
commitf35f897ec8ec0752ea4d4830e72f5193375a474b
tree86df8ad39aa29ead379097eb70b375106add822e
parent7815835d21a5c0b6dbc58d9bc9dd823d4952f86f
LU-17334 lov: handle object created on newly added OST

When a new OST is added to a filesystem without no_create,
then a new object created on the OST relatively quickly
after it is added to the filesystem, in particular because
the new OST would be preferred by QOS space balancing
due to lots of free space. However, it might take a few
seconds for the addition of the new OST to be propagated
across all of the clients, so there is a risk that the MDS
creates file object on OSTs that a client is not yet aware of,
which returns an error to the application immediately.

This patch fixes the issue by adding a loop in lsme_unpack()
that is waiting and retrying for some number of seconds for
the filesystem layout to be updated if either the
"loi->loi_ost_idx >= lov->desc.ld_tgt_count" or "!ltd"
condition is hit.

Change-Id: Idc29b8c66079afaea25428577daf51370fa2b084
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53335
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_ea.c