X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fosp%2Fosp_precreate.c;h=ae7e4ef7e851872b685636a905e91fddc92925b6;hb=6f56f71b407a8c14db4c2accd37da5b4feecde1a;hp=8570fa6795ac147fcaa6e1ae881f5c24e0ba1c32;hpb=5801dad47e4727a44b6343a3f7f875d7992f29a3;p=fs%2Flustre-release.git diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 8570fa6..ae7e4ef 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -836,17 +836,19 @@ static int osp_precreate_cleanup_orphans(struct lu_env *env, if (body == NULL) GOTO(out, rc = -EPROTO); - body->oa.o_flags = OBD_FL_DELORPHAN; + body->oa.o_flags = 0; body->oa.o_valid = OBD_MD_FLFLAGS | OBD_MD_FLGROUP; /* unless this is the very first DELORPHAN (when we really * can destroy some orphans), just tell OST to recreate * missing objects in our precreate pool */ spin_lock(&d->opd_pre_lock); - if (d->opd_pre->osp_pre_delorphan_sent) + if (d->opd_pre->osp_pre_delorphan_sent) { fid = d->opd_pre_last_created_fid; - else + } else { fid = d->opd_last_used_fid; + body->oa.o_flags = OBD_FL_DELORPHAN; + } spin_unlock(&d->opd_pre_lock); fid_to_ostid(&fid, &body->oa.o_oi); @@ -1162,7 +1164,8 @@ static int osp_precreate_thread(void *_arg) */ while (osp_precreate_running(d)) { if (d->opd_pre_recovering && - d->opd_imp_connected) + d->opd_imp_connected && + !d->opd_got_disconnected) break; l_wait_event(d->opd_pre_waitq, !osp_precreate_running(d) ||