Whamcloud - gitweb
LU-3285 merge: 'dom' branch merging
[fs/lustre-release.git] / lustre / ofd / ofd_dev.c
index fcb477a..6c0abd0 100644 (file)
@@ -1698,10 +1698,10 @@ static int ofd_create_hdl(struct tgt_session_info *tsi)
                }
        }
        if (diff > 0) {
-               cfs_time_t       enough_time = cfs_time_shift(DISK_TIMEOUT);
-               u64              next_id;
-               int              created = 0;
-               int              count;
+               time64_t enough_time = ktime_get_seconds() + DISK_TIMEOUT;
+               u64 next_id;
+               int created = 0;
+               int count;
 
                if (!(oa->o_valid & OBD_MD_FLFLAGS) ||
                    !(oa->o_flags & OBD_FL_DELORPHAN)) {
@@ -1749,7 +1749,7 @@ static int ofd_create_hdl(struct tgt_session_info *tsi)
                               count, seq, next_id);
 
                        if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY)
-                           && cfs_time_after(jiffies, enough_time)) {
+                           && ktime_get_seconds() > enough_time) {
                                CDEBUG(D_HA, "%s: Slow creates, %d/%lld objects"
                                      " created at a rate of %d/s\n",
                                      ofd_name(ofd), created, diff + created,
@@ -2364,16 +2364,16 @@ static int ofd_quotactl(struct tgt_session_info *tsi)
  *
  * \retval             amount of time to extend the timeout with
  */
-static inline int prolong_timeout(struct ptlrpc_request *req)
+static inline time64_t prolong_timeout(struct ptlrpc_request *req)
 {
        struct ptlrpc_service_part *svcpt = req->rq_rqbd->rqbd_svcpt;
-       time_t req_timeout;
+       time64_t req_timeout;
 
        if (AT_OFF)
                return obd_timeout / 2;
 
        req_timeout = req->rq_deadline - req->rq_arrival_time.tv_sec;
-       return max_t(time_t, at_est2timeout(at_get(&svcpt->scp_at_estimate)),
+       return max_t(time64_t, at_est2timeout(at_get(&svcpt->scp_at_estimate)),
                     req_timeout);
 }