Whamcloud - gitweb
LU-9346 lod: replay of PFL file open failure 30/26630/7
authorBobi Jam <bobijam.xu@intel.com>
Fri, 14 Apr 2017 17:41:37 +0000 (01:41 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 May 2017 17:47:15 +0000 (17:47 +0000)
During replay of PFL file open, lod_qos_parse_config()->
lod_use_defined_striping() initialed stripe LU-objects, but it keeps
the component's LCME_FL_INIT flag; and later in lod_striping_create()
these component will be skipped create OST objects, that fails the
replay, it should replay creating its OST objects.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ic84374941df7a14b53e463f6117d5fbb9995c33d
Reviewed-on: https://review.whamcloud.com/26630
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_object.c
lustre/lod/lod_qos.c

index d7fad3e..933b05d 100644 (file)
@@ -4992,13 +4992,6 @@ static int lod_declare_layout_change(const struct lu_env *env,
                        GOTO(out, rc = -EINVAL);
 
                need_create = true;
-               /*
-                * In replay, the component EA is passed by client,
-                * Clear LCME_FL_INIT so that lod_striping_create() can create
-                * the striping objects.
-                */
-               if (replay)
-                       lod_comp_unset_init(lod_comp);
 
                rc = lod_qos_prep_create(env, lo, NULL, th, i, inuse);
                if (rc)
index 080b8b2..5cd73db 100644 (file)
@@ -2098,7 +2098,7 @@ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo,
                        lod_comp->llc_stripe = stripe;
                        lod_comp->llc_stripes_allocated = stripe_len;
                }
-       } else if (!(lod_comp->llc_flags & LCME_FL_INIT)) {
+       } else {
                /*
                 * lod_qos_parse_config() found supplied buf as a predefined
                 * striping (not a hint), so it allocated all the object
@@ -2117,6 +2117,12 @@ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo,
                                break;
                        }
                }
+               /**
+                * Clear LCME_FL_INIT for the component so that
+                * lod_striping_create() can create the striping objects
+                * in replay.
+                */
+               lod_comp_unset_init(lod_comp);
        }
 
 out: