1 /* object based disk file system
3 * This code is issued under the GNU General Public License.
4 * See the file COPYING in this distribution
15 #include <linux/ext2_fs.h>
17 #include <linux/lustre_net.h>
18 #include <linux/lustre_mds.h>
19 #include <linux/lustre_ha.h>
20 #include <linux/obdo.h>
22 #define LUSTRE_LITE_NAME "llite"
24 extern kmem_cache_t *ll_file_data_slab;
29 #define LL_INLINESZ 60
30 struct ll_inode_info {
33 char lli_inline[LL_INLINESZ];
36 #define LL_SUPER_MAGIC 0x0BD00BD0;
38 struct list_head ll_list; /* list of supers */
39 struct obd_conn ll_conn;
40 struct super_block *ll_super;
41 ino_t ll_rootino; /* number of root inode */
42 int ll_minor; /* minor of /dev/obdX */
43 struct list_head ll_inodes; /* list of dirty inodes */
44 unsigned long ll_cache_count;
45 struct semaphore ll_list_mutex;
46 struct ptlrpc_client ll_mds_client;
47 struct lustre_peer ll_mds_peer;
48 struct ptlrpc_client ll_ost_client;
49 struct lustre_ha_mgr *ll_ha_mgr;
50 struct lustre_peer ll_ost_peer;
54 static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
56 return (struct ll_sb_info *) (inode->i_sb->u.generic_sbp);
59 static inline struct ll_inode_info *ll_i2info(struct inode *inode)
61 return (struct ll_inode_info *)&(inode->u.generic_ip);
64 static inline int ll_has_inline(struct inode *inode)
66 return (ll_i2info(inode)->lli_flags & OBD_FL_INLINEDATA);
70 static inline struct obd_conn *ll_i2obdconn(struct inode *inode)
72 return &(ll_i2sbi(inode))->ll_conn;
76 extern struct file_operations ll_dir_operations;
77 extern struct inode_operations ll_dir_inode_operations;
80 extern struct file_operations ll_file_operations;
81 extern struct inode_operations ll_file_inode_operations;
84 struct page *ll_getpage(struct inode *inode, unsigned long offset,
85 int create, int locked);
86 void ll_truncate(struct inode *inode);
89 extern struct inode_operations ll_fast_symlink_inode_operations;
90 extern struct inode_operations ll_symlink_inode_operations;
93 void ll_sysctl_init(void);
94 void ll_sysctl_clean(void);
98 static inline struct list_head *ll_slist(struct inode *inode)
100 struct ll_sb_info *sbi = ll_i2sbi(inode);
102 return &sbi->ll_inodes;