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/obdo.h>
21 #define LUSTRE_LITE_NAME "llite"
23 extern kmem_cache_t *ll_file_data_slab;
28 #define LL_INLINESZ 60
29 struct ll_inode_info {
32 char lli_inline[LL_INLINESZ];
35 #define LL_SUPER_MAGIC 0x0BD00BD0;
37 struct list_head ll_list; /* list of supers */
38 struct obd_conn ll_conn;
39 struct super_block *ll_super;
40 ino_t ll_rootino; /* number of root inode */
41 int ll_minor; /* minor of /dev/obdX */
42 struct list_head ll_inodes; /* list of dirty inodes */
43 unsigned long ll_cache_count;
44 struct semaphore ll_list_mutex;
45 struct ptlrpc_client ll_mds_client;
46 struct lustre_peer ll_mds_peer;
47 struct ptlrpc_client ll_ost_client;
48 struct lustre_peer ll_ost_peer;
52 static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
54 return (struct ll_sb_info *) (inode->i_sb->u.generic_sbp);
57 static inline struct ll_inode_info *ll_i2info(struct inode *inode)
59 return (struct ll_inode_info *)&(inode->u.generic_ip);
62 static inline int ll_has_inline(struct inode *inode)
64 return (ll_i2info(inode)->lli_flags & OBD_FL_INLINEDATA);
68 static inline struct obd_conn *ll_i2obdconn(struct inode *inode)
70 return &(ll_i2sbi(inode))->ll_conn;
74 extern struct file_operations ll_dir_operations;
75 extern struct inode_operations ll_dir_inode_operations;
78 extern struct file_operations ll_file_operations;
79 extern struct inode_operations ll_file_inode_operations;
82 struct page *ll_getpage(struct inode *inode, unsigned long offset,
83 int create, int locked);
84 void ll_truncate(struct inode *inode);
87 extern struct inode_operations ll_fast_symlink_inode_operations;
88 extern struct inode_operations ll_symlink_inode_operations;
91 void ll_sysctl_init(void);
92 void ll_sysctl_clean(void);
96 static inline struct list_head *ll_slist(struct inode *inode)
98 struct ll_sb_info *sbi = ll_i2sbi(inode);
100 return &sbi->ll_inodes;