X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_coordinator.c;h=fa92f7505d56a5c10ffca8a9d2e38360b1f4a89c;hp=f98ec0ef79c47886a88c2bc592d3790b133a8e7e;hb=b87e99adf44b80308f341cbf143374034f627ab9;hpb=a70e10cdd43f2139cb9f95b96fbaa860ec0b2b7a diff --git a/lustre/mdt/mdt_coordinator.c b/lustre/mdt/mdt_coordinator.c index f98ec0e..fa92f75 100644 --- a/lustre/mdt/mdt_coordinator.c +++ b/lustre/mdt/mdt_coordinator.c @@ -725,6 +725,10 @@ static int hsm_restore_cb(const struct lu_env *env, larr = (struct llog_agent_req_rec *)hdr; hai = &larr->arr_hai; + if (hai->hai_cookie > cdt->cdt_last_cookie) + /* update the cookie to avoid collision */ + cdt->cdt_last_cookie = hai->hai_cookie + 1; + if (hai->hai_action != HSMA_RESTORE || agent_req_in_final_state(larr->arr_status)) RETURN(0); @@ -741,7 +745,7 @@ static int hsm_restore_cb(const struct lu_env *env, crh->extent.end = hai->hai_extent.offset + hai->hai_extent.length; */ crh->crh_extent.start = 0; - crh->crh_extent.end = OBD_OBJECT_EOF; + crh->crh_extent.end = hai->hai_extent.length; /* get the layout lock */ mdt_lock_reg_init(&crh->crh_lh, LCK_EX); child = mdt_object_find_lock(mti, &crh->crh_fid, &crh->crh_lh,