Whamcloud - gitweb
WARNING - if an RPC times out you will crash older UML's.
[fs/lustre-release.git] / lustre / include / linux / lustre_lite.h
1 /* object based disk file system
2  * 
3  * This code is issued under the GNU General Public License.
4  * See the file COPYING in this distribution
5  * 
6  *
7  *
8  *
9
10
11
12 #ifndef _LL_H
13 #define _LL_H
14
15 #include <linux/ext2_fs.h>
16
17 #include <linux/lustre_net.h>
18 #include <linux/lustre_mds.h>
19 #include <linux/lustre_ha.h>
20 #include <linux/obdo.h>
21
22 extern kmem_cache_t *ll_file_data_slab;
23 struct ll_file_data { 
24         __u64 fd_mdshandle; 
25 };
26
27 #define LL_INLINESZ      60
28 struct ll_inode_info {
29         int              lli_flags;
30         __u64            lli_objid; 
31         char             lli_inline[LL_INLINESZ];
32 };
33
34 #define LL_SUPER_MAGIC 0x0BD00BD0;
35
36 #define LL_COMMITCBD_STOPPING  0x1
37 #define LL_COMMITCBD_STOPPED   0x2
38 #define LL_COMMITCBD_RUNNING   0x4
39
40 struct ll_sb_info {
41         struct obd_conn           ll_conn;
42         ino_t                     ll_rootino; /* number of root inode */
43         struct ptlrpc_client      ll_mds_client;
44         struct ptlrpc_connection *ll_mds_conn;
45         struct ptlrpc_client      ll_ost_client;
46         struct ptlrpc_connection *ll_ost_conn;
47
48         struct list_head          ll_commitcbd_not_committed;
49         wait_queue_head_t         ll_commitcbd_waitq;
50         wait_queue_head_t         ll_commitcbd_ctl_waitq;
51         int                       ll_commitcbd_flags;
52         struct task_struct        *ll_commitcbd_thread;
53         time_t                    ll_commitcbd_waketime;
54         time_t                    ll_commitcbd_timeout;
55         spinlock_t                ll_commitcbd_lock;
56 };
57
58
59 static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
60 {
61         return (struct ll_sb_info *) (inode->i_sb->u.generic_sbp);
62 }
63
64 static inline struct ll_inode_info *ll_i2info(struct inode *inode)
65 {
66         return (struct ll_inode_info *)&(inode->u.generic_ip);
67 }
68
69 static inline int ll_has_inline(struct inode *inode)
70 {
71         return (ll_i2info(inode)->lli_flags & OBD_FL_INLINEDATA);
72 }
73
74
75 static inline struct obd_conn *ll_i2obdconn(struct inode *inode)
76 {
77         return &(ll_i2sbi(inode))->ll_conn;
78 }
79
80 /* dir.c */
81 extern struct file_operations ll_dir_operations;
82 extern struct inode_operations ll_dir_inode_operations;
83
84 /* file.c */
85 extern struct file_operations ll_file_operations;
86 extern struct inode_operations ll_file_inode_operations;
87
88 /* rw.c */
89 struct page *ll_getpage(struct inode *inode, unsigned long offset,
90                            int create, int locked);
91 void ll_truncate(struct inode *inode);
92
93 /* symlink.c */
94 extern struct inode_operations ll_fast_symlink_inode_operations;
95 extern struct inode_operations ll_symlink_inode_operations;
96
97 /* sysctl.c */
98 void ll_sysctl_init(void);
99 void ll_sysctl_clean(void);
100
101 #endif
102