X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Finclude%2Flclient.h;h=9b2293294fbccb9c0ca3b8b2105361163cdeff46;hb=b7caa793443674f65122d3e3ea23de569ae8510f;hp=afa462c9e985178e1a9c8f6f67454874be495cb4;hpb=8701e7e4b5ec1b34700c95b9b6588f4745730b72;p=fs%2Flustre-release.git diff --git a/lustre/include/lclient.h b/lustre/include/lclient.h index afa462c..9b22932 100644 --- a/lustre/include/lclient.h +++ b/lustre/include/lclient.h @@ -121,10 +121,6 @@ struct ccc_io { } write; } u; /** - * True iff io is processing glimpse right now. - */ - int cui_glimpse; - /** * Layout version when this IO is initialized */ __u32 cui_layout_gen; @@ -145,9 +141,10 @@ extern struct lu_context_key ccc_key; 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_attr cti_attr; + struct cl_lock cti_lock; + struct cl_lock_descr cti_descr; + struct cl_io cti_io; + struct cl_attr cti_attr; }; static inline struct ccc_thread_info *ccc_env_info(const struct lu_env *env) @@ -159,6 +156,13 @@ static inline struct ccc_thread_info *ccc_env_info(const struct lu_env *env) return info; } +static inline struct cl_lock *ccc_env_lock(const struct lu_env *env) +{ + struct cl_lock *lock = &ccc_env_info(env)->cti_lock; + memset(lock, 0, sizeof *lock); + return lock; +} + static inline struct cl_attr *ccc_env_thread_attr(const struct lu_env *env) { struct cl_attr *attr = &ccc_env_info(env)->cti_attr; @@ -349,18 +353,7 @@ 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); -int ccc_lock_use(const struct lu_env *env,const struct cl_lock_slice *slice); -int ccc_lock_unuse(const struct lu_env *env,const struct cl_lock_slice *slice); -int ccc_lock_wait(const struct lu_env *env,const struct cl_lock_slice *slice); -int ccc_lock_fits_into(const struct lu_env *env, - const struct cl_lock_slice *slice, - const struct cl_lock_descr *need, - const struct cl_io *io); -void ccc_lock_state(const struct lu_env *env, - const struct cl_lock_slice *slice, - enum cl_lock_state state); - + struct cl_io *io, struct cl_sync_io *anchor); void ccc_io_fini(const struct lu_env *env, const struct cl_io_slice *ios); int ccc_io_one_lock_index(const struct lu_env *env, struct cl_io *io, __u32 enqflags, enum cl_lock_mode mode, @@ -463,9 +456,13 @@ struct cl_client_cache { */ atomic_t ccc_users; /** + * # of threads are doing shrinking + */ + unsigned int ccc_lru_shrinkers; + /** * # of LRU entries available */ - atomic_t ccc_lru_left; + atomic_long_t ccc_lru_left; /** * List of entities(OSCs) for this LRU cache */ @@ -479,22 +476,18 @@ struct cl_client_cache { */ spinlock_t ccc_lru_lock; /** - * # of threads are doing shrinking - */ - unsigned int ccc_lru_shrinkers; - /** * Set if unstable check is enabled */ unsigned int ccc_unstable_check:1; /** + * # of unstable pages for this mount point + */ + atomic_long_t ccc_unstable_nr; + /** * Waitq for awaiting unstable pages to reach zero. * Used at umounting time and signaled on BRW commit */ wait_queue_head_t ccc_unstable_waitq; - /** - * # of unstable pages for this mount point - */ - atomic_t ccc_unstable_nr; }; enum {