Whamcloud - gitweb
LU-8760 lib: avoid unexpected out of order execution
[fs/lustre-release.git] / lustre / include / lustre_import.h
index 7a1b1f4..1b44d32 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 #define AT_FLG_NOHIST 0x1          /* use last reported value only */
 
 struct adaptive_timeout {
-       time_t          at_binstart;         /* bin start time */
+       time64_t        at_binstart;         /* bin start time */
        unsigned int    at_hist[AT_BINS];    /* timeout history bins */
        unsigned int    at_flags;
        unsigned int    at_current;          /* current timeout value */
        unsigned int    at_worst_ever;       /* worst-ever timeout value */
-       time_t          at_worst_time;       /* worst-ever timeout timestamp */
+       time64_t        at_worst_time;       /* worst-ever timeout timestamp */
        spinlock_t      at_lock;
 };
 
@@ -75,7 +75,7 @@ struct ptlrpc_at_array {
        struct list_head *paa_reqs_array; /** array to hold requests */
         __u32             paa_size;       /** the size of array */
         __u32             paa_count;      /** the total count of reqs */
-        time_t            paa_deadline;   /** the earliest deadline of reqs */
+       time64_t          paa_deadline;   /** the earliest deadline of reqs */
         __u32            *paa_reqs_count; /** the count of reqs in each entry */
 };
 
@@ -148,8 +148,8 @@ struct obd_import_conn {
 /* state history */
 #define IMP_STATE_HIST_LEN 16
 struct import_state_hist {
-        enum lustre_imp_state ish_state;
-        time_t                ish_time;
+       enum lustre_imp_state   ish_state;
+       time64_t                ish_time;
 };
 
 /**
@@ -206,7 +206,7 @@ struct obd_import {
          */
        struct ptlrpc_sec        *imp_sec;
        struct mutex              imp_sec_mutex;
-       cfs_time_t                imp_sec_expire;
+       time64_t                imp_sec_expire;
        pid_t                     imp_sec_refpid;
         /** @} */
 
@@ -321,7 +321,7 @@ struct obd_import {
 
                                  /* adaptive timeout data */
        struct imp_at             imp_at;
-       time_t                    imp_last_reply_time;    /* for health check */
+       time64_t                  imp_last_reply_time;  /* for health check */
 };
 
 /* import.c */
@@ -342,7 +342,7 @@ static inline void at_reset_nolock(struct adaptive_timeout *at, int val)
 {
         at->at_current = val;
         at->at_worst_ever = val;
-        at->at_worst_time = cfs_time_current_sec();
+       at->at_worst_time = ktime_get_real_seconds();
 }
 
 static inline void at_reset(struct adaptive_timeout *at, int val)