Whamcloud - gitweb
LU-7653 lod: fix stripe allocation during recovery 37/38137/3
authorAlexander Boyko <c17825@cray.com>
Mon, 6 Apr 2020 07:04:26 +0000 (03:04 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Apr 2020 08:11:15 +0000 (08:11 +0000)
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 <c17825@cray.com>
Cray-bug-id: LUS-7550
Change-Id: I23ac3c2561d90a47ec04599818e88054395b7787
Reviewed-on: https://review.whamcloud.com/38137
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_object.c

index e81de8c..284a577 100644 (file)
@@ -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;