+int llu_merge_lvb(const struct lu_env *env, struct inode *inode);
+
+static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb)
+{
+ struct intnl_stat *st = llu_i2stat(inode);
+ lvb->lvb_size = st->st_size;
+ lvb->lvb_blocks = st->st_blocks;
+ lvb->lvb_mtime = st->st_mtime;
+ lvb->lvb_atime = st->st_atime;
+ lvb->lvb_ctime = st->st_ctime;
+}
+
+#define LLU_IO_GROUP_SIZE(x) \
+ (sizeof(struct llu_io_group) + \
+ (sizeof(struct ll_async_page) + \
+ sizeof(cfs_page_t) + \
+ llap_cookie_size) * (x))
+
+struct llu_io_session {
+ struct inode *lis_inode;
+ int lis_cmd;
+ int lis_max_groups;
+ int lis_ngroups;
+ int lis_rc;
+ __u64 lis_rwcount;
+};
+
+struct llu_io_group
+{
+ struct lustre_rw_params *lig_params;
+ int lig_rc;
+ __u64 lig_rwcount;
+};
+
+struct llu_io_session;
+void put_io_group(struct llu_io_group *group);
+
+int cl_sb_init(struct llu_sb_info *sbi);
+int cl_sb_fini(struct llu_sb_info *sbi);
+
+void llu_io_init(struct cl_io *io, struct inode *inode, int write);
+
+struct slp_io {
+ struct llu_io_session *sio_session;
+};
+
+struct slp_session {
+ struct slp_io ss_ios;
+};
+
+static inline struct slp_session *slp_env_session(const struct lu_env *env)
+{
+ extern struct lu_context_key slp_session_key;
+ struct slp_session *ses;
+ ses = lu_context_key_get(env->le_ses, &slp_session_key);
+ LASSERT(ses != NULL);
+ return ses;
+}
+static inline struct slp_io *slp_env_io(const struct lu_env *env)
+{
+ return &slp_env_session(env)->ss_ios;
+}
+
+/* lclient compat stuff */
+#define cl_inode_info llu_inode_info
+#define cl_i2info(info) llu_i2info(info)
+#define cl_inode_mode(inode) (llu_i2stat(inode)->st_mode)
+#define cl_i2sbi llu_i2sbi
+#define cl_isize_read(inode) (llu_i2stat(inode)->st_size)
+#define cl_isize_write(inode,kms) do{llu_i2stat(inode)->st_size = kms;}while(0)
+#define cl_isize_write_nolock(inode,kms) cl_isize_write(inode,kms)
+
+static inline struct ll_file_data *cl_iattr2fd(struct inode *inode,
+ const struct iattr *attr)
+{
+ return llu_i2info(inode)->lli_file_data;
+}
+
+static inline void cl_isize_lock(struct inode *inode)
+{
+}
+
+static inline void cl_isize_unlock(struct inode *inode)
+{
+}
+
+static inline int cl_merge_lvb(const struct lu_env *env, struct inode *inode)
+{
+ return llu_merge_lvb(env, inode);
+}
+
+#define cl_inode_atime(inode) (llu_i2stat(inode)->st_atime)
+#define cl_inode_ctime(inode) (llu_i2stat(inode)->st_ctime)
+#define cl_inode_mtime(inode) (llu_i2stat(inode)->st_mtime)
+
+static inline struct obd_capa *cl_capa_lookup(struct inode *inode,
+ enum cl_req_type crt)
+{
+ return NULL;
+}
+
+static inline void cl_stats_tally(struct cl_device *dev, enum cl_req_type crt,
+ int rc)
+{
+}
+
+static inline loff_t i_size_read(struct inode *inode)
+{
+ return inode->i_stbuf.st_size;
+}
+
+static inline void i_size_write(struct inode *inode, loff_t i_sz)
+{
+ inode->i_stbuf.st_size = i_sz;
+}