Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / include / linux / sunrpc / metrics.h
index 8f96e9d..b6edbc0 100644 (file)
@@ -26,6 +26,7 @@
 #define _LINUX_SUNRPC_METRICS_H
 
 #include <linux/seq_file.h>
+#include <linux/ktime.h>
 
 #define RPC_IOSTATS_VERS       "1.0"
 
@@ -58,9 +59,9 @@ struct rpc_iostats {
         * and the total time the request spent from init to release
         * are measured.
         */
-       unsigned long long      om_queue,       /* jiffies queued for xmit */
-                               om_rtt,         /* jiffies for RPC RTT */
-                               om_execute;     /* jiffies for RPC execution */
+       ktime_t                 om_queue,       /* queued for xmit */
+                               om_rtt,         /* RPC RTT */
+                               om_execute;     /* RPC execution */
 } ____cacheline_aligned;
 
 struct rpc_task;
@@ -69,9 +70,21 @@ struct rpc_clnt;
 /*
  * EXPORTed functions for managing rpc_iostats structures
  */
+
+#ifdef CONFIG_PROC_FS
+
 struct rpc_iostats *   rpc_alloc_iostats(struct rpc_clnt *);
 void                   rpc_count_iostats(struct rpc_task *);
 void                   rpc_print_iostats(struct seq_file *, struct rpc_clnt *);
 void                   rpc_free_iostats(struct rpc_iostats *);
 
+#else  /*  CONFIG_PROC_FS  */
+
+static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; }
+static inline void rpc_count_iostats(struct rpc_task *task) {}
+static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {}
+static inline void rpc_free_iostats(struct rpc_iostats *stats) {}
+
+#endif  /*  CONFIG_PROC_FS  */
+
 #endif /* _LINUX_SUNRPC_METRICS_H */