Whamcloud - gitweb
LU-17334 lov: handle object created on newly added OST 35/53335/7
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 5 Dec 2023 20:45:44 +0000 (12:45 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 6 Dec 2023 06:34:58 +0000 (06:34 +0000)
commite1de624373ce6082253ddbdd987d36eb56ca6490
tree46afd8860798d9194f5270418b37d9dfb79717f8
parentde352465eb6a02aeb20357208c54e903585e12e3
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>
lustre/lov/lov_ea.c