X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flclient.h;h=8f6aef3f9c660e08d698ad0082de3e0fc04af728;hb=a1a1add56b5557cb23971bcfcdc2482dcb9764ef;hp=dfd7f65dbfff61eebc80b3cbcf17214a904d0d9d;hpb=fbf5870b9848929d352460f1f005b79c0b5ccc5a;p=fs%2Flustre-release.git diff --git a/lustre/include/lclient.h b/lustre/include/lclient.h index dfd7f65..8f6aef3 100644 --- a/lustre/include/lclient.h +++ b/lustre/include/lclient.h @@ -123,7 +123,6 @@ extern struct lu_context_key ccc_session_key; struct ccc_thread_info { struct cl_lock_descr cti_descr; struct cl_io cti_io; - struct cl_sync_io cti_sync_io; struct cl_attr cti_attr; }; @@ -136,6 +135,13 @@ static inline struct ccc_thread_info *ccc_env_info(const struct lu_env *env) return info; } +static inline struct cl_attr *ccc_env_thread_attr(const struct lu_env *env) +{ + struct cl_attr *attr = &ccc_env_info(env)->cti_attr; + memset(attr, 0, sizeof(*attr)); + return attr; +} + struct ccc_session { struct ccc_io cs_ios; }; @@ -202,7 +208,6 @@ struct ccc_page { struct list_head cpg_pending_linkage; /** VM page */ cfs_page_t *cpg_page; - struct cl_sync_io *cpg_sync_io; /** * checksum for paranoid I/O debugging enabled by * ENABLE_LLITE_CHECKSUM configuration option. @@ -305,6 +310,8 @@ void ccc_transient_page_discard(const struct lu_env *env, int ccc_transient_page_prep(const struct lu_env *env, const struct cl_page_slice *slice, struct cl_io *io); +void ccc_lock_delete(const struct lu_env *env, + const struct cl_lock_slice *slice); void ccc_lock_fini(const struct lu_env *env,struct cl_lock_slice *slice); int ccc_lock_enqueue(const struct lu_env *env,const struct cl_lock_slice *slice, struct cl_io *io, __u32 enqflags); @@ -326,8 +333,13 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io, __u32 enqflags, enum cl_lock_mode mode, loff_t start, loff_t end); void ccc_io_end(const struct lu_env *env, const struct cl_io_slice *ios); +void ccc_io_advance(const struct lu_env *env, const struct cl_io_slice *ios, + size_t nob); +void ccc_io_update_iov(const struct lu_env *env, struct ccc_io *cio, + struct cl_io *io); int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, - struct cl_io *io, loff_t pos, int vfslock); + struct cl_io *io, loff_t start, size_t count, int vfslock, + int *exceed); void ccc_req_completion(const struct lu_env *env, const struct cl_req_slice *slice, int ioret); void ccc_req_attr_set(const struct lu_env *env,const struct cl_req_slice *slice, @@ -358,6 +370,8 @@ int cl_inode_init(struct inode *inode, struct lustre_md *md); void cl_inode_fini(struct inode *inode); int cl_local_size(struct inode *inode); +__u16 ll_dirent_type_get(struct lu_dirent *ent); + #ifdef INVARIANT_CHECK # define CLOBINVRNT(env, clob, expr) \ do { \ @@ -371,5 +385,19 @@ int cl_local_size(struct inode *inode); ((void)sizeof(env), (void)sizeof(clob), (void)sizeof !!(expr)) #endif /* !INVARIANT_CHECK */ +int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp); +int cl_ocd_update(struct obd_device *host, + struct obd_device *watched, + enum obd_notify_event ev, void *owner, void *data); + +struct ccc_grouplock { + struct lu_env *cg_env; + struct cl_lock *cg_lock; + unsigned long cg_gid; +}; + +int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock, + struct ccc_grouplock *cg); +void cl_put_grouplock(struct ccc_grouplock *cg); #endif /*LCLIENT_H */