From 340ea262e728f2fab47c66876cbc372fa0e65aee Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Sat, 15 Apr 2017 01:41:37 +0800 Subject: [PATCH] LU-9346 lod: replay of PFL file open failure 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 Change-Id: Ic84374941df7a14b53e463f6117d5fbb9995c33d Reviewed-on: https://review.whamcloud.com/26630 Reviewed-by: Niu Yawei Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/lod/lod_object.c | 7 ------- lustre/lod/lod_qos.c | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index d7fad3e..933b05d 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -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) diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index 080b8b2..5cd73db 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -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: -- 1.8.3.1