1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
9 #error Do not #include this file directly. #include <lustre_lite.h> instead
14 #include <linux/version.h>
16 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
17 #include <asm/statfs.h>
21 #include <linux/dcache.h>
22 #include <linux/proc_fs.h>
24 #include <obd_class.h>
25 #include <lustre_net.h>
26 #include <lustre_mds.h>
27 #include <lustre_ha.h>
29 #include <linux/rbtree.h>
30 #include <linux/lustre_compat25.h>
31 #include <linux/pagemap.h>
33 #ifdef HAVE_PERCPU_COUNTER
34 #include <linux/percpu_counter.h>
36 typedef struct percpu_counter lcounter_t;
38 #define lcounter_read(counter) (int)percpu_counter_read(counter)
39 #define lcounter_inc(counter) percpu_counter_inc(counter)
40 #define lcounter_dec(counter) percpu_counter_dec(counter)
42 #ifdef HAVE_PERCPU_2ND_ARG
43 # define lcounter_init(counter) percpu_counter_init(counter, 0)
45 # define lcounter_init(counter) percpu_counter_init(counter)
48 #define lcounter_destroy(counter) percpu_counter_destroy(counter)
51 typedef struct { atomic_t count; } lcounter_t;
53 #define lcounter_read(counter) atomic_read(&counter->count)
54 #define lcounter_inc(counter) atomic_inc(&counter->count)
55 #define lcounter_dec(counter) atomic_dec(&counter->count)
56 #define lcounter_init(counter) atomic_set(&counter->count, 0)
57 #define lcounter_destroy(counter)
59 #endif /* if defined HAVE_PERCPU_COUNTER */
63 LPROC_LL_DIRTY_HITS = 0,
64 LPROC_LL_DIRTY_MISSES,
65 LPROC_LL_WB_WRITEPAGE,
81 LPROC_LL_LOCKLESS_TRUNC,
84 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
97 LPROC_LL_DIRECT_WRITE,
98 LPROC_LL_LOCKLESS_READ,
99 LPROC_LL_LOCKLESS_WRITE,
100 LPROC_LL_FILE_OPCODES
104 #include <lustre/lustre_idl.h>
105 #endif /* __KERNEL__ */