X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftarget%2Ftgt_handler.c;h=aab362f7b88e2e119ef1c5532162179477ea053d;hb=refs%2Fchanges%2F77%2F24977%2F14;hp=02f290212d8b148a35a81efb8ed22a8aeff63163;hpb=4ce3219eb8e6a07c5c37e4b425b29195488005c3;p=fs%2Flustre-release.git diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 02f2902..aab362f 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -1926,13 +1926,12 @@ int tgt_brw_read(struct tgt_session_info *tsi) * If getting the lock took more time than * client was willing to wait, drop it. b=11330 */ - if (cfs_time_current_sec() > req->rq_deadline || + if (ktime_get_real_seconds() > req->rq_deadline || OBD_FAIL_CHECK(OBD_FAIL_OST_DROP_REQ)) { no_reply = 1; - CERROR("Dropping timed-out read from %s because locking" - "object "DOSTID" took %ld seconds (limit was %ld).\n", + CERROR("Dropping timed-out read from %s because locking object " DOSTID " took %lld seconds (limit was %lld).\n", libcfs_id2str(req->rq_peer), POSTID(&ioo->ioo_oid), - cfs_time_current_sec() - req->rq_arrival_time.tv_sec, + ktime_get_real_seconds() - req->rq_arrival_time.tv_sec, req->rq_deadline - req->rq_arrival_time.tv_sec); GOTO(out_lock, rc = -ETIMEDOUT); } @@ -2202,14 +2201,13 @@ int tgt_brw_write(struct tgt_session_info *tsi) * If getting the lock took more time than * client was willing to wait, drop it. b=11330 */ - if (cfs_time_current_sec() > req->rq_deadline || + if (ktime_get_real_seconds() > req->rq_deadline || OBD_FAIL_CHECK(OBD_FAIL_OST_DROP_REQ)) { no_reply = true; - CERROR("%s: Dropping timed-out write from %s because locking " - "object "DOSTID" took %ld seconds (limit was %ld).\n", + CERROR("%s: Dropping timed-out write from %s because locking object " DOSTID " took %lld seconds (limit was %lld).\n", tgt_name(tsi->tsi_tgt), libcfs_id2str(req->rq_peer), POSTID(&ioo->ioo_oid), - cfs_time_current_sec() - req->rq_arrival_time.tv_sec, + ktime_get_real_seconds() - req->rq_arrival_time.tv_sec, req->rq_deadline - req->rq_arrival_time.tv_sec); GOTO(out_lock, rc = -ETIMEDOUT); }