For sanity-lfsck test_18e, sometimes, before the client wirte
happened, the layout LFSCK has already gone into the phase2
and replaced the new created OST-object with the old orphan
OST-object, then cause the subsequent check failure.
To resolve such trouble, we will hold the layout LFSCK when
replacing the new created OST-object until the client write
happened.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia5be2cd2ea920fa02bb281ca5c59d8d252f3fd7b
Reviewed-on: http://review.whamcloud.com/18146
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
int rc = 0;
ENTRY;
+ while (CFS_FAIL_TIMEOUT(OBD_FAIL_LFSCK_DELAY3, cfs_fail_val)) {
+ if (unlikely(!thread_is_running(&com->lc_lfsck->li_thread)))
+ RETURN(0);
+ }
+
ostid_le_to_cpu(&slot->l_ost_oi, oi);
rc = ostid_to_fid(cfid2, oi, ost_idx2);
if (rc != 0)