These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / lustre / lustre / include / lustre_import.h
index dcc8076..4e4230e 100644 (file)
@@ -50,7 +50,6 @@
 #include "lustre_handles.h"
 #include "lustre/lustre_idl.h"
 
-
 /**
  * Adaptive Timeout stuff
  *
 #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;
 };
 
@@ -74,7 +73,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 */
 };
 
@@ -85,7 +84,6 @@ struct imp_at {
        struct adaptive_timeout iat_service_estimate[IMP_AT_MAX_PORTALS];
 };
 
-
 /** @} */
 
 /** Possible import states */
@@ -148,7 +146,7 @@ struct obd_import_conn {
 #define IMP_STATE_HIST_LEN 16
 struct import_state_hist {
        enum lustre_imp_state ish_state;
-       time_t          ish_time;
+       time64_t        ish_time;
 };
 
 /**
@@ -200,7 +198,7 @@ struct obd_import {
         */
        struct ptlrpc_sec       *imp_sec;
        struct mutex              imp_sec_mutex;
-       unsigned long           imp_sec_expire;
+       time64_t                imp_sec_expire;
        /** @} */
 
        /** Wait queue for those who need to wait for recovery completion */
@@ -306,10 +304,8 @@ struct obd_import {
        __u32                imp_msg_magic;
        __u32                imp_msghdr_flags;       /* adjusted based on server capability */
 
-       struct ptlrpc_request_pool *imp_rq_pool;          /* emergency request pool */
-
        struct imp_at        imp_at;             /* adaptive timeout data */
-       time_t              imp_last_reply_time;    /* for health check */
+       time64_t             imp_last_reply_time;    /* for health check */
 };
 
 typedef void (*obd_import_callback)(struct obd_import *imp, void *closure,
@@ -353,9 +349,10 @@ static inline void at_reset(struct adaptive_timeout *at, int val)
        spin_lock(&at->at_lock);
        at->at_current = val;
        at->at_worst_ever = val;
-       at->at_worst_time = get_seconds();
+       at->at_worst_time = ktime_get_real_seconds();
        spin_unlock(&at->at_lock);
 }
+
 static inline void at_init(struct adaptive_timeout *at, int val, int flags)
 {
        memset(at, 0, sizeof(*at));
@@ -363,11 +360,13 @@ static inline void at_init(struct adaptive_timeout *at, int val, int flags)
        at->at_flags = flags;
        at_reset(at, val);
 }
+
 extern unsigned int at_min;
 static inline int at_get(struct adaptive_timeout *at)
 {
        return (at->at_current > at_min) ? at->at_current : at_min;
 }
+
 int at_measured(struct adaptive_timeout *at, unsigned int val);
 int import_at_get_index(struct obd_import *imp, int portal);
 extern unsigned int at_max;
@@ -375,8 +374,7 @@ extern unsigned int at_max;
 
 /* genops.c */
 struct obd_export;
-extern struct obd_import *class_exp2cliimp(struct obd_export *);
-extern struct obd_import *class_conn2cliimp(struct lustre_handle *);
+struct obd_import *class_exp2cliimp(struct obd_export *);
 
 /** @} import */