Whamcloud - gitweb
LU-17334 lov: handle object created on newly added OST
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 6 Dec 2023 18:32:57 +0000 (10:32 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 7 Dec 2023 11:11:04 +0000 (11:11 +0000)
commit3b2bda581a2994dfaf5343da455416203531d67f
treea6af620b781c2a99fa495baecec5d7b2f54d7d2f
parent4eb7b73945f77b41eef5649d485deecd5a1baa43
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.

Lustre-change: https://review.whamcloud.com/53335
Lustre-commit: TBD (from e1de624373ce6082253ddbdd987d36eb56ca6490)

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/ex/lustre-release/+/53353
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/lov/lov_ea.c