X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosc%2Fosc_request.c;h=2d565f6394c23e0553475c15898b55321f297267;hp=12a42e52edfa1691c0c8d8b841960c9e09b8491d;hb=87c86d444e61e38d6454bba5700ba966dc1ac83d;hpb=25c97ec86f471de50556673b52d1e1b7713063af diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 12a42e5..2d565f6 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -292,6 +292,7 @@ out: int osc_real_create(struct obd_export *exp, struct obdo *oa, struct lov_stripe_md **ea, struct obd_trans_info *oti) { + struct osc_creator *oscc = &exp->exp_obd->u.cli.cl_oscc; struct ptlrpc_request *request; struct ost_body *body; struct lov_stripe_md *lsm; @@ -337,6 +338,16 @@ int osc_real_create(struct obd_export *exp, struct obdo *oa, GOTO (out_req, rc = -EPROTO); } + if ((oa->o_valid & OBD_MD_FLFLAGS) && oa->o_flags == OBD_FL_DELORPHAN) { + struct obd_import *imp = class_exp2cliimp(exp); + /* MDS declares last known object, OSS responses + * with next possible object -bzzz */ + spin_lock(&oscc->oscc_lock); + oscc->oscc_next_id = body->oa.o_id; + spin_unlock(&oscc->oscc_lock); + CDEBUG(D_HA, "%s: set nextid "LPD64" after recovery\n", + imp->imp_target_uuid.uuid, oa->o_id); + } memcpy(oa, &body->oa, sizeof(*oa)); /* This should really be sent by the OST */