Whamcloud - gitweb
* Compiles after merging b1_4
[fs/lustre-release.git] / lustre / include / linux / lustre_lite.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3
4
5 #ifndef _LL_H
6 #define _LL_H
7
8 #ifdef __KERNEL__
9
10 #include <linux/version.h>
11
12 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
13 #include <asm/statfs.h>
14 #endif
15
16 #include <linux/fs.h>
17 #include <linux/dcache.h>
18 #include <linux/jbd.h>
19 #include <linux/ext3_fs.h>
20 #include <linux/proc_fs.h>
21
22 #include <linux/obd_class.h>
23 #include <linux/lustre_net.h>
24 #include <linux/lustre_mds.h>
25 #include <linux/lustre_ha.h>
26
27 #include <linux/rbtree.h>
28 #include <linux/lustre_compat25.h>
29 #include <linux/pagemap.h>
30
31 /* careful, this is easy to screw up */
32 #define PAGE_CACHE_MAXBYTES ((__u64)(~0UL) << PAGE_CACHE_SHIFT)
33
34 /* lprocfs.c */
35 enum {
36          LPROC_LL_DIRTY_HITS = 0,
37          LPROC_LL_DIRTY_MISSES,
38          LPROC_LL_WB_WRITEPAGE,
39          LPROC_LL_WB_PRESSURE,
40          LPROC_LL_WB_OK,
41          LPROC_LL_WB_FAIL,
42          LPROC_LL_READ_BYTES,
43          LPROC_LL_WRITE_BYTES,
44          LPROC_LL_BRW_READ,
45          LPROC_LL_BRW_WRITE,
46          LPROC_LL_IOCTL,
47          LPROC_LL_OPEN,
48          LPROC_LL_RELEASE,
49          LPROC_LL_MAP,
50          LPROC_LL_LLSEEK,
51          LPROC_LL_FSYNC,
52          LPROC_LL_SETATTR,
53          LPROC_LL_TRUNC,
54
55 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
56          LPROC_LL_GETATTR,
57 #else
58          LPROC_LL_REVALIDATE,
59 #endif
60          LPROC_LL_STAFS,
61          LPROC_LL_ALLOC_INODE,
62
63          LPROC_LL_DIRECT_READ,
64          LPROC_LL_DIRECT_WRITE,
65          LPROC_LL_FILE_OPCODES
66 };
67
68 #else
69 #include <linux/lustre_idl.h>
70 #endif /* __KERNEL__ */
71
72 #define LLAP_FROM_COOKIE(c)                                                    \
73         (LASSERT(((struct ll_async_page *)(c))->llap_magic == LLAP_MAGIC),     \
74          (struct ll_async_page *)(c))
75 #define LL_MAX_BLKSIZE          (4UL * 1024 * 1024)
76
77 #include <lustre/lustre_user.h>
78
79 #endif