Commit 3ee45c7e authored by Yang Sheng's avatar Yang Sheng Committed by Greg Kroah-Hartman

staging: lustre: lov: trying smaller memory allocations

Reduce struct lov_io_sub to smaller memory usage
on wide-stripe file systems.
Signed-off-by: default avatarYang Sheng <yang.sheng@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7085
Reviewed-on: http://review.whamcloud.com/17476Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarJian Yu <jian.yu@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37471504
...@@ -2437,9 +2437,9 @@ void cl_sync_io_end(const struct lu_env *env, struct cl_sync_io *anchor); ...@@ -2437,9 +2437,9 @@ void cl_sync_io_end(const struct lu_env *env, struct cl_sync_io *anchor);
* @{ * @{
*/ */
struct lu_env *cl_env_get(int *refcheck); struct lu_env *cl_env_get(u16 *refcheck);
struct lu_env *cl_env_alloc(int *refcheck, __u32 tags); struct lu_env *cl_env_alloc(u16 *refcheck, __u32 tags);
void cl_env_put(struct lu_env *env, int *refcheck); void cl_env_put(struct lu_env *env, u16 *refcheck);
unsigned int cl_env_cache_purge(unsigned int nr); unsigned int cl_env_cache_purge(unsigned int nr);
struct lu_env *cl_env_percpu_get(void); struct lu_env *cl_env_percpu_get(void);
void cl_env_percpu_put(struct lu_env *env); void cl_env_percpu_put(struct lu_env *env);
......
...@@ -1159,7 +1159,7 @@ static ssize_t ll_file_read_iter(struct kiocb *iocb, struct iov_iter *to) ...@@ -1159,7 +1159,7 @@ static ssize_t ll_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
struct lu_env *env; struct lu_env *env;
struct vvp_io_args *args; struct vvp_io_args *args;
ssize_t result; ssize_t result;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (IS_ERR(env)) if (IS_ERR(env))
...@@ -1183,7 +1183,7 @@ static ssize_t ll_file_write_iter(struct kiocb *iocb, struct iov_iter *from) ...@@ -1183,7 +1183,7 @@ static ssize_t ll_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
struct lu_env *env; struct lu_env *env;
struct vvp_io_args *args; struct vvp_io_args *args;
ssize_t result; ssize_t result;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (IS_ERR(env)) if (IS_ERR(env))
...@@ -1340,7 +1340,7 @@ static int ll_file_getstripe(struct inode *inode, ...@@ -1340,7 +1340,7 @@ static int ll_file_getstripe(struct inode *inode,
struct lov_user_md __user *lum) struct lov_user_md __user *lum)
{ {
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
int rc; int rc;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
...@@ -1517,7 +1517,7 @@ static int ll_do_fiemap(struct inode *inode, struct fiemap *fiemap, ...@@ -1517,7 +1517,7 @@ static int ll_do_fiemap(struct inode *inode, struct fiemap *fiemap,
{ {
struct ll_fiemap_info_key fmkey = { .lfik_name = KEY_FIEMAP, }; struct ll_fiemap_info_key fmkey = { .lfik_name = KEY_FIEMAP, };
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
int rc = 0; int rc = 0;
/* Checks for fiemap flags */ /* Checks for fiemap flags */
...@@ -1623,7 +1623,7 @@ int ll_data_version(struct inode *inode, __u64 *data_version, int flags) ...@@ -1623,7 +1623,7 @@ int ll_data_version(struct inode *inode, __u64 *data_version, int flags)
struct cl_object *obj = ll_i2info(inode)->lli_clob; struct cl_object *obj = ll_i2info(inode)->lli_clob;
struct lu_env *env; struct lu_env *env;
struct cl_io *io; struct cl_io *io;
int refcheck; u16 refcheck;
int result; int result;
/* If no file object initialized, we consider its version is 0. */ /* If no file object initialized, we consider its version is 0. */
...@@ -1668,7 +1668,7 @@ int ll_hsm_release(struct inode *inode) ...@@ -1668,7 +1668,7 @@ int ll_hsm_release(struct inode *inode)
struct obd_client_handle *och = NULL; struct obd_client_handle *och = NULL;
__u64 data_version = 0; __u64 data_version = 0;
int rc; int rc;
int refcheck; u16 refcheck;
CDEBUG(D_INODE, "%s: Releasing file "DFID".\n", CDEBUG(D_INODE, "%s: Releasing file "DFID".\n",
ll_get_fsname(inode->i_sb, NULL, 0), ll_get_fsname(inode->i_sb, NULL, 0),
...@@ -2324,7 +2324,7 @@ int cl_sync_file_range(struct inode *inode, loff_t start, loff_t end, ...@@ -2324,7 +2324,7 @@ int cl_sync_file_range(struct inode *inode, loff_t start, loff_t end,
struct cl_io *io; struct cl_io *io;
struct cl_fsync_io *fio; struct cl_fsync_io *fio;
int result; int result;
int refcheck; u16 refcheck;
if (mode != CL_FSYNC_NONE && mode != CL_FSYNC_LOCAL && if (mode != CL_FSYNC_NONE && mode != CL_FSYNC_LOCAL &&
mode != CL_FSYNC_DISCARD && mode != CL_FSYNC_ALL) mode != CL_FSYNC_DISCARD && mode != CL_FSYNC_ALL)
...@@ -3272,7 +3272,7 @@ int ll_layout_conf(struct inode *inode, const struct cl_object_conf *conf) ...@@ -3272,7 +3272,7 @@ int ll_layout_conf(struct inode *inode, const struct cl_object_conf *conf)
struct cl_object *obj = lli->lli_clob; struct cl_object *obj = lli->lli_clob;
struct lu_env *env; struct lu_env *env;
int rc; int rc;
int refcheck; u16 refcheck;
if (!obj) if (!obj)
return 0; return 0;
......
...@@ -138,7 +138,7 @@ int cl_glimpse_lock(const struct lu_env *env, struct cl_io *io, ...@@ -138,7 +138,7 @@ int cl_glimpse_lock(const struct lu_env *env, struct cl_io *io,
} }
static int cl_io_get(struct inode *inode, struct lu_env **envout, static int cl_io_get(struct inode *inode, struct lu_env **envout,
struct cl_io **ioout, int *refcheck) struct cl_io **ioout, u16 *refcheck)
{ {
struct lu_env *env; struct lu_env *env;
struct cl_io *io; struct cl_io *io;
...@@ -178,7 +178,7 @@ int cl_glimpse_size0(struct inode *inode, int agl) ...@@ -178,7 +178,7 @@ int cl_glimpse_size0(struct inode *inode, int agl)
struct lu_env *env = NULL; struct lu_env *env = NULL;
struct cl_io *io = NULL; struct cl_io *io = NULL;
int result; int result;
int refcheck; u16 refcheck;
result = cl_io_get(inode, &env, &io, &refcheck); result = cl_io_get(inode, &env, &io, &refcheck);
if (result > 0) { if (result > 0) {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
* mutex. * mutex.
*/ */
struct lu_env *cl_inode_fini_env; struct lu_env *cl_inode_fini_env;
int cl_inode_fini_refcheck; u16 cl_inode_fini_refcheck;
/** /**
* A mutex serializing calls to slp_inode_fini() under extreme memory * A mutex serializing calls to slp_inode_fini() under extreme memory
...@@ -86,7 +86,7 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr, ...@@ -86,7 +86,7 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr,
struct lu_env *env; struct lu_env *env;
struct cl_io *io; struct cl_io *io;
int result; int result;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (IS_ERR(env)) if (IS_ERR(env))
...@@ -149,7 +149,7 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md) ...@@ -149,7 +149,7 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md)
} }
}; };
int result = 0; int result = 0;
int refcheck; u16 refcheck;
LASSERT(md->body->mbo_valid & OBD_MD_FLID); LASSERT(md->body->mbo_valid & OBD_MD_FLID);
LASSERT(S_ISREG(inode->i_mode)); LASSERT(S_ISREG(inode->i_mode));
...@@ -237,7 +237,7 @@ void cl_inode_fini(struct inode *inode) ...@@ -237,7 +237,7 @@ void cl_inode_fini(struct inode *inode)
struct lu_env *env; struct lu_env *env;
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
struct cl_object *clob = lli->lli_clob; struct cl_object *clob = lli->lli_clob;
int refcheck; u16 refcheck;
int emergency; int emergency;
if (clob) { if (clob) {
......
...@@ -124,7 +124,7 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock, ...@@ -124,7 +124,7 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
struct cl_lock *lock; struct cl_lock *lock;
struct cl_lock_descr *descr; struct cl_lock_descr *descr;
__u32 enqflags; __u32 enqflags;
int refcheck; u16 refcheck;
int rc; int rc;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
......
...@@ -1330,7 +1330,7 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr, ...@@ -1330,7 +1330,7 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr,
unsigned int attr_flags); unsigned int attr_flags);
extern struct lu_env *cl_inode_fini_env; extern struct lu_env *cl_inode_fini_env;
extern int cl_inode_fini_refcheck; extern u16 cl_inode_fini_refcheck;
int cl_file_inode_init(struct inode *inode, struct lustre_md *md); int cl_file_inode_init(struct inode *inode, struct lustre_md *md);
void cl_inode_fini(struct inode *inode); void cl_inode_fini(struct inode *inode);
......
...@@ -150,7 +150,7 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage, ...@@ -150,7 +150,7 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage,
struct cl_io *io; struct cl_io *io;
struct vvp_io *vio; struct vvp_io *vio;
int result; int result;
int refcheck; u16 refcheck;
sigset_t set; sigset_t set;
struct inode *inode; struct inode *inode;
struct ll_inode_info *lli; struct ll_inode_info *lli;
...@@ -268,7 +268,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -268,7 +268,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf)
unsigned long ra_flags; unsigned long ra_flags;
int result = 0; int result = 0;
int fault_ret = 0; int fault_ret = 0;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (IS_ERR(env)) if (IS_ERR(env))
......
...@@ -386,7 +386,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, ...@@ -386,7 +386,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file,
struct lu_env *env; struct lu_env *env;
long diff = 0; long diff = 0;
long nrpages = 0; long nrpages = 0;
int refcheck; u16 refcheck;
long pages_number; long pages_number;
int mult; int mult;
long rc; long rc;
......
...@@ -905,7 +905,7 @@ int ll_writepage(struct page *vmpage, struct writeback_control *wbc) ...@@ -905,7 +905,7 @@ int ll_writepage(struct page *vmpage, struct writeback_control *wbc)
bool redirtied = false; bool redirtied = false;
bool unlocked = false; bool unlocked = false;
int result; int result;
int refcheck; u16 refcheck;
LASSERT(PageLocked(vmpage)); LASSERT(PageLocked(vmpage));
LASSERT(!PageWriteback(vmpage)); LASSERT(!PageWriteback(vmpage));
......
...@@ -313,7 +313,7 @@ int cl_sb_init(struct super_block *sb) ...@@ -313,7 +313,7 @@ int cl_sb_init(struct super_block *sb)
struct cl_device *cl; struct cl_device *cl;
struct lu_env *env; struct lu_env *env;
int rc = 0; int rc = 0;
int refcheck; u16 refcheck;
sbi = ll_s2sbi(sb); sbi = ll_s2sbi(sb);
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
...@@ -336,7 +336,7 @@ int cl_sb_fini(struct super_block *sb) ...@@ -336,7 +336,7 @@ int cl_sb_fini(struct super_block *sb)
struct ll_sb_info *sbi; struct ll_sb_info *sbi;
struct lu_env *env; struct lu_env *env;
struct cl_device *cld; struct cl_device *cld;
int refcheck; u16 refcheck;
int result; int result;
sbi = ll_s2sbi(sb); sbi = ll_s2sbi(sb);
...@@ -535,7 +535,7 @@ static int vvp_pgcache_show(struct seq_file *f, void *v) ...@@ -535,7 +535,7 @@ static int vvp_pgcache_show(struct seq_file *f, void *v)
struct cl_object *clob; struct cl_object *clob;
struct lu_env *env; struct lu_env *env;
struct vvp_pgcache_id id; struct vvp_pgcache_id id;
int refcheck; u16 refcheck;
int result; int result;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
...@@ -584,7 +584,7 @@ static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) ...@@ -584,7 +584,7 @@ static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos)
{ {
struct ll_sb_info *sbi; struct ll_sb_info *sbi;
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
sbi = f->private; sbi = f->private;
...@@ -608,7 +608,7 @@ static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos) ...@@ -608,7 +608,7 @@ static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos)
{ {
struct ll_sb_info *sbi; struct ll_sb_info *sbi;
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (!IS_ERR(env)) { if (!IS_ERR(env)) {
......
...@@ -427,7 +427,7 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size) ...@@ -427,7 +427,7 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
.cl_buf.lb_len = buf_size, .cl_buf.lb_len = buf_size,
}; };
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
if (!obj) if (!obj)
return -ENODATA; return -ENODATA;
......
...@@ -118,7 +118,7 @@ struct lov_device_emerg { ...@@ -118,7 +118,7 @@ struct lov_device_emerg {
* *
* \see cl_env_get() * \see cl_env_get()
*/ */
int emrg_refcheck; u16 emrg_refcheck;
}; };
struct lov_device { struct lov_device {
...@@ -378,40 +378,39 @@ struct lov_thread_info { ...@@ -378,40 +378,39 @@ struct lov_thread_info {
* State that lov_io maintains for every sub-io. * State that lov_io maintains for every sub-io.
*/ */
struct lov_io_sub { struct lov_io_sub {
int sub_stripe; u16 sub_stripe;
/**
* sub-io for a stripe. Ideally sub-io's can be stopped and resumed
* independently, with lov acting as a scheduler to maximize overall
* throughput.
*/
struct cl_io *sub_io;
/** /**
* Linkage into a list (hanging off lov_io::lis_active) of all * environment's refcheck.
* sub-io's active for the current IO iteration. *
* \see cl_env_get()
*/ */
struct list_head sub_linkage; u16 sub_refcheck;
u16 sub_reenter;
/** /**
* true, iff cl_io_init() was successfully executed against * true, iff cl_io_init() was successfully executed against
* lov_io_sub::sub_io. * lov_io_sub::sub_io.
*/ */
int sub_io_initialized; u16 sub_io_initialized:1,
/** /**
* True, iff lov_io_sub::sub_io and lov_io_sub::sub_env weren't * True, iff lov_io_sub::sub_io and lov_io_sub::sub_env weren't
* allocated, but borrowed from a per-device emergency pool. * allocated, but borrowed from a per-device emergency pool.
*/ */
int sub_borrowed; sub_borrowed:1;
/** /**
* environment, in which sub-io executes. * Linkage into a list (hanging off lov_io::lis_active) of all
* sub-io's active for the current IO iteration.
*/ */
struct lu_env *sub_env; struct list_head sub_linkage;
/** /**
* environment's refcheck. * sub-io for a stripe. Ideally sub-io's can be stopped and resumed
* * independently, with lov acting as a scheduler to maximize overall
* \see cl_env_get() * throughput.
*/ */
int sub_refcheck; struct cl_io *sub_io;
int sub_refcheck2; /**
int sub_reenter; * environment, in which sub-io executes.
*/
struct lu_env *sub_env;
}; };
/** /**
......
...@@ -746,7 +746,7 @@ static int lov_layout_change(const struct lu_env *unused, ...@@ -746,7 +746,7 @@ static int lov_layout_change(const struct lu_env *unused,
const struct lov_layout_operations *old_ops; const struct lov_layout_operations *old_ops;
const struct lov_layout_operations *new_ops; const struct lov_layout_operations *new_ops;
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
int rc; int rc;
LASSERT(0 <= lov->lo_type && lov->lo_type < ARRAY_SIZE(lov_dispatch)); LASSERT(0 <= lov->lo_type && lov->lo_type < ARRAY_SIZE(lov_dispatch));
......
...@@ -688,7 +688,7 @@ static inline struct cl_env *cl_env_container(struct lu_env *env) ...@@ -688,7 +688,7 @@ static inline struct cl_env *cl_env_container(struct lu_env *env)
* *
* \see cl_env_put() * \see cl_env_put()
*/ */
struct lu_env *cl_env_get(int *refcheck) struct lu_env *cl_env_get(u16 *refcheck)
{ {
struct lu_env *env; struct lu_env *env;
...@@ -709,7 +709,7 @@ EXPORT_SYMBOL(cl_env_get); ...@@ -709,7 +709,7 @@ EXPORT_SYMBOL(cl_env_get);
* *
* \see cl_env_get() * \see cl_env_get()
*/ */
struct lu_env *cl_env_alloc(int *refcheck, __u32 tags) struct lu_env *cl_env_alloc(u16 *refcheck, u32 tags)
{ {
struct lu_env *env; struct lu_env *env;
...@@ -769,7 +769,7 @@ EXPORT_SYMBOL(cl_env_cache_purge); ...@@ -769,7 +769,7 @@ EXPORT_SYMBOL(cl_env_cache_purge);
* this thread is using environment and it is returned to the allocation * this thread is using environment and it is returned to the allocation
* cache, or freed straight away, if cache is large enough. * cache, or freed straight away, if cache is large enough.
*/ */
void cl_env_put(struct lu_env *env, int *refcheck) void cl_env_put(struct lu_env *env, u16 *refcheck)
{ {
struct cl_env *cle; struct cl_env *cle;
......
...@@ -816,7 +816,7 @@ cl_echo_object_find(struct echo_device *d, const struct ost_id *oi) ...@@ -816,7 +816,7 @@ cl_echo_object_find(struct echo_device *d, const struct ost_id *oi)
struct echo_object *eco; struct echo_object *eco;
struct cl_object *obj; struct cl_object *obj;
struct lu_fid *fid; struct lu_fid *fid;
int refcheck; u16 refcheck;
int rc; int rc;
LASSERTF(ostid_id(oi), DOSTID "\n", POSTID(oi)); LASSERTF(ostid_id(oi), DOSTID "\n", POSTID(oi));
...@@ -882,7 +882,7 @@ static int cl_echo_object_put(struct echo_object *eco) ...@@ -882,7 +882,7 @@ static int cl_echo_object_put(struct echo_object *eco)
{ {
struct lu_env *env; struct lu_env *env;
struct cl_object *obj = echo_obj2cl(eco); struct cl_object *obj = echo_obj2cl(eco);
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (IS_ERR(env)) if (IS_ERR(env))
...@@ -999,7 +999,7 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset, ...@@ -999,7 +999,7 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset,
struct cl_page *clp; struct cl_page *clp;
struct lustre_handle lh = { 0 }; struct lustre_handle lh = { 0 };
size_t page_size = cl_page_size(obj); size_t page_size = cl_page_size(obj);
int refcheck; u16 refcheck;
int rc; int rc;
int i; int i;
......
...@@ -229,7 +229,7 @@ static ssize_t osc_cached_mb_seq_write(struct file *file, ...@@ -229,7 +229,7 @@ static ssize_t osc_cached_mb_seq_write(struct file *file,
rc = atomic_long_read(&cli->cl_lru_in_list) - pages_number; rc = atomic_long_read(&cli->cl_lru_in_list) - pages_number;
if (rc > 0) { if (rc > 0) {
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (!IS_ERR(env)) { if (!IS_ERR(env)) {
......
...@@ -988,7 +988,7 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index, ...@@ -988,7 +988,7 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index,
int grants = 0; int grants = 0;
int nr_pages = 0; int nr_pages = 0;
int rc = 0; int rc = 0;
int refcheck; u16 refcheck;
LASSERT(sanity_check(ext) == 0); LASSERT(sanity_check(ext) == 0);
EASSERT(ext->oe_state == OES_TRUNC, ext); EASSERT(ext->oe_state == OES_TRUNC, ext);
......
...@@ -297,7 +297,7 @@ static int osc_lock_upcall(void *cookie, struct lustre_handle *lockh, ...@@ -297,7 +297,7 @@ static int osc_lock_upcall(void *cookie, struct lustre_handle *lockh,
struct cl_lock_slice *slice = &oscl->ols_cl; struct cl_lock_slice *slice = &oscl->ols_cl;
struct lu_env *env; struct lu_env *env;
int rc; int rc;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
/* should never happen, similar to osc_ldlm_blocking_ast(). */ /* should never happen, similar to osc_ldlm_blocking_ast(). */
...@@ -349,7 +349,7 @@ static int osc_lock_upcall_agl(void *cookie, struct lustre_handle *lockh, ...@@ -349,7 +349,7 @@ static int osc_lock_upcall_agl(void *cookie, struct lustre_handle *lockh,
struct osc_object *osc = cookie; struct osc_object *osc = cookie;
struct ldlm_lock *dlmlock; struct ldlm_lock *dlmlock;
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
LASSERT(!IS_ERR(env)); LASSERT(!IS_ERR(env));
...@@ -384,7 +384,7 @@ static int osc_lock_flush(struct osc_object *obj, pgoff_t start, pgoff_t end, ...@@ -384,7 +384,7 @@ static int osc_lock_flush(struct osc_object *obj, pgoff_t start, pgoff_t end,
enum cl_lock_mode mode, int discard) enum cl_lock_mode mode, int discard)
{ {
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
int rc = 0; int rc = 0;
int rc2 = 0; int rc2 = 0;
...@@ -538,7 +538,7 @@ static int osc_ldlm_blocking_ast(struct ldlm_lock *dlmlock, ...@@ -538,7 +538,7 @@ static int osc_ldlm_blocking_ast(struct ldlm_lock *dlmlock,
} }
case LDLM_CB_CANCELING: { case LDLM_CB_CANCELING: {
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
/* /*
* This can be called in the context of outer IO, e.g., * This can be called in the context of outer IO, e.g.,
...@@ -575,7 +575,7 @@ static int osc_ldlm_glimpse_ast(struct ldlm_lock *dlmlock, void *data) ...@@ -575,7 +575,7 @@ static int osc_ldlm_glimpse_ast(struct ldlm_lock *dlmlock, void *data)
struct req_capsule *cap; struct req_capsule *cap;
struct cl_object *obj = NULL; struct cl_object *obj = NULL;
int result; int result;
int refcheck; u16 refcheck;
LASSERT(lustre_msg_get_opc(req->rq_reqmsg) == LDLM_GL_CALLBACK); LASSERT(lustre_msg_get_opc(req->rq_reqmsg) == LDLM_GL_CALLBACK);
...@@ -686,7 +686,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock) ...@@ -686,7 +686,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock)
struct osc_lock *oscl; struct osc_lock *oscl;
unsigned long weight; unsigned long weight;
bool found = false; bool found = false;
int refcheck; u16 refcheck;
might_sleep(); might_sleep();
/* /*
......
...@@ -681,7 +681,7 @@ static long osc_lru_reclaim(struct client_obd *cli, unsigned long npages) ...@@ -681,7 +681,7 @@ static long osc_lru_reclaim(struct client_obd *cli, unsigned long npages)
struct lu_env *env; struct lu_env *env;
struct cl_client_cache *cache = cli->cl_cache; struct cl_client_cache *cache = cli->cl_cache;
int max_scans; int max_scans;
int refcheck; u16 refcheck;
long rc = 0; long rc = 0;
LASSERT(cache); LASSERT(cache);
...@@ -1045,7 +1045,7 @@ unsigned long osc_cache_shrink_scan(struct shrinker *sk, ...@@ -1045,7 +1045,7 @@ unsigned long osc_cache_shrink_scan(struct shrinker *sk,
struct client_obd *cli; struct client_obd *cli;
struct lu_env *env; struct lu_env *env;
long shrank = 0; long shrank = 0;
int refcheck; u16 refcheck;
int rc; int rc;
if (!sc->nr_to_scan) if (!sc->nr_to_scan)
......
...@@ -2538,7 +2538,7 @@ static int osc_import_event(struct obd_device *obd, ...@@ -2538,7 +2538,7 @@ static int osc_import_event(struct obd_device *obd,
case IMP_EVENT_INVALIDATE: { case IMP_EVENT_INVALIDATE: {
struct ldlm_namespace *ns = obd->obd_namespace; struct ldlm_namespace *ns = obd->obd_namespace;
struct lu_env *env; struct lu_env *env;
int refcheck; u16 refcheck;
ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY); ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment