X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_recovery.c;h=50c69ebc64efb8c727ec4e3373944d211d75e121;hp=9c1367d31624b8b317ef1ee9fea064100764ed56;hb=71fc2a4d9d37c488b64ef882bc83e5096171c703;hpb=ce95c918eb48bdb5fb910f2d75062fbca27ddc47;ds=sidebyside diff --git a/lustre/mdt/mdt_recovery.c b/lustre/mdt/mdt_recovery.c index 9c1367d..50c69eb 100644 --- a/lustre/mdt/mdt_recovery.c +++ b/lustre/mdt/mdt_recovery.c @@ -758,16 +758,18 @@ static int mdt_last_rcvd_update(struct mdt_thread_info *mti, lustre_msg_get_opc(req->rq_reqmsg) == MDS_DONE_WRITING) { if (mti->mti_transno != 0) { if (lcd->lcd_last_close_transno > mti->mti_transno) { - LASSERT(req_is_replay(req)); CERROR("Trying to overwrite bigger transno:" - "on-disk: "LPU64", new: "LPU64"\n", + "on-disk: "LPU64", new: "LPU64" " + "replay: %d. see LU-617.\n", lcd->lcd_last_close_transno, - mti->mti_transno); - cfs_spin_lock(&req->rq_export->exp_lock); - req->rq_export->exp_vbr_failed = 1; - cfs_spin_unlock(&req->rq_export->exp_lock); + mti->mti_transno, req_is_replay(req)); + if (req_is_replay(req)) { + cfs_spin_lock(&req->rq_export->exp_lock); + req->rq_export->exp_vbr_failed = 1; + cfs_spin_unlock(&req->rq_export->exp_lock); + } cfs_mutex_up(&ted->ted_lcd_lock); - RETURN(-EOVERFLOW); + RETURN(req_is_replay(req) ? -EOVERFLOW : 0); } lcd->lcd_last_close_transno = mti->mti_transno; } @@ -784,16 +786,18 @@ static int mdt_last_rcvd_update(struct mdt_thread_info *mti, } if (mti->mti_transno != 0) { if (lcd->lcd_last_transno > mti->mti_transno) { - LASSERT(req_is_replay(req)); CERROR("Trying to overwrite bigger transno:" - "on-disk: "LPU64", new: "LPU64"\n", + "on-disk: "LPU64", new: "LPU64" " + "replay: %d. see LU-617.\n", lcd->lcd_last_transno, - mti->mti_transno); - cfs_spin_lock(&req->rq_export->exp_lock); - req->rq_export->exp_vbr_failed = 1; - cfs_spin_unlock(&req->rq_export->exp_lock); + mti->mti_transno, req_is_replay(req)); + if (req_is_replay(req)) { + cfs_spin_lock(&req->rq_export->exp_lock); + req->rq_export->exp_vbr_failed = 1; + cfs_spin_unlock(&req->rq_export->exp_lock); + } cfs_mutex_up(&ted->ted_lcd_lock); - RETURN(-EOVERFLOW); + RETURN(req_is_replay(req) ? -EOVERFLOW : 0); } lcd->lcd_last_transno = mti->mti_transno; }