From 858c0c6959c1319e83a18be5ef6cb50251542052 Mon Sep 17 00:00:00 2001 From: Alexander Boyko Date: Mon, 6 Apr 2020 03:04:26 -0400 Subject: [PATCH] LU-7653 lod: fix stripe allocation during recovery replay-single 110f fails sometimes because it gets less directory stripes during replay. lod_prep_md_striped_create() skips MDT from allocation if MDT is not connected(dt_statfs returns error). lod_prep_md_striped_create()) try idx 0, mdt cnt 2, allocated 1 osp_statfs())Process entered osp_statfs())Process leaving (rc=18446744073709551509 : -107 : ffffffffffffff95) lod_prep_md_striped_create())lustre-MDT0001-mdtlov: require stripes 2 only get 1 The patch allows striping if lod target is active(fid allocation is working). Signed-off-by: Alexander Boyko Cray-bug-id: LUS-7550 Change-Id: I23ac3c2561d90a47ec04599818e88054395b7787 Reviewed-on: https://review.whamcloud.com/38137 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andriy Skulysh Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/lod/lod_object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index e81de8c..284a577 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -1973,7 +1973,6 @@ static int lod_mdt_alloc_specific(const struct lu_env *env, struct dt_object **stripes, __u32 *mdt_indices, bool is_specific) { - struct lod_thread_info *info = lod_env_info(env); struct lod_device *lod = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); struct lu_tgt_descs *ltd = &lod->lod_mdt_descs; struct lu_tgt_desc *tgt = NULL; @@ -2042,8 +2041,7 @@ static int lod_mdt_alloc_specific(const struct lu_env *env, continue; tgt_dt = tgt->ltd_tgt; - rc = dt_statfs(env, tgt_dt, &info->lti_osfs); - if (rc) + if (!tgt->ltd_active) /* this OSP doesn't feel well */ continue; -- 1.8.3.1