The setattr from open(open(O_TRUNC)) is serialized with
'cl_setattr_lock' on client and goes to a dedicate portal, which is
different with other reint operations, consequently, setattr RPC
can be parallel with other reint RPCs, and that result in the race of
updating last_transno/last_xid on server.
This temporary fix removes the LASSERT(req_is_replay(req)) in
mdt_last_rcvd_update().
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I7e07eaf9e718c2d75d9a503207523be9c700ea4a
Reviewed-on: http://review.whamcloud.com/1295
Tested-by: Hudson
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre_msg_get_opc(req->rq_reqmsg) == MDS_DONE_WRITING) {
if (mti->mti_transno != 0) {
if (lcd->lcd_last_close_transno > mti->mti_transno) {
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:"
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,
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);
cfs_mutex_up(&ted->ted_lcd_lock);
+ RETURN(req_is_replay(req) ? -EOVERFLOW : 0);
}
lcd->lcd_last_close_transno = mti->mti_transno;
}
}
lcd->lcd_last_close_transno = mti->mti_transno;
}
}
if (mti->mti_transno != 0) {
if (lcd->lcd_last_transno > mti->mti_transno) {
}
if (mti->mti_transno != 0) {
if (lcd->lcd_last_transno > mti->mti_transno) {
- LASSERT(req_is_replay(req));
CERROR("Trying to overwrite bigger transno:"
CERROR("Trying to overwrite bigger transno:"
- "on-disk: "LPU64", new: "LPU64"\n",
+ "on-disk: "LPU64", new: "LPU64" "
+ "replay: %d. see LU-617.\n",
- 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);
cfs_mutex_up(&ted->ted_lcd_lock);
+ RETURN(req_is_replay(req) ? -EOVERFLOW : 0);
}
lcd->lcd_last_transno = mti->mti_transno;
}
}
lcd->lcd_last_transno = mti->mti_transno;
}