* @{
*/
-struct lu_env *cl_env_get(int *refcheck);
-struct lu_env *cl_env_alloc(int *refcheck, __u32 tags);
-void cl_env_put(struct lu_env *env, int *refcheck);
+struct lu_env *cl_env_get(u16 *refcheck);
+struct lu_env *cl_env_alloc(u16 *refcheck, __u32 tags);
+void cl_env_put(struct lu_env *env, u16 *refcheck);
unsigned int cl_env_cache_purge(unsigned int nr);
struct lu_env *cl_env_percpu_get(void);
void cl_env_percpu_put(struct lu_env *env);
struct lu_env *env;
struct vvp_io_args *args;
ssize_t result;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
struct lu_env *env;
struct vvp_io_args *args;
ssize_t result;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
struct lov_user_md __user *lum)
{
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
int rc;
env = cl_env_get(&refcheck);
{
struct ll_fiemap_info_key fmkey = { .lfik_name = KEY_FIEMAP, };
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
int rc = 0;
/* Checks for fiemap flags */
struct cl_object *obj = ll_i2info(inode)->lli_clob;
struct lu_env *env;
struct cl_io *io;
- int refcheck;
+ u16 refcheck;
int result;
/* If no file object initialized, we consider its version is 0. */
struct obd_client_handle *och = NULL;
__u64 data_version = 0;
int rc;
- int refcheck;
+ u16 refcheck;
CDEBUG(D_INODE, "%s: Releasing file "DFID".\n",
ll_get_fsname(inode->i_sb, NULL, 0),
struct cl_io *io;
struct cl_fsync_io *fio;
int result;
- int refcheck;
+ u16 refcheck;
if (mode != CL_FSYNC_NONE && mode != CL_FSYNC_LOCAL &&
mode != CL_FSYNC_DISCARD && mode != CL_FSYNC_ALL)
struct cl_object *obj = lli->lli_clob;
struct lu_env *env;
int rc;
- int refcheck;
+ u16 refcheck;
if (!obj)
return 0;
}
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 cl_io *io;
struct lu_env *env = NULL;
struct cl_io *io = NULL;
int result;
- int refcheck;
+ u16 refcheck;
result = cl_io_get(inode, &env, &io, &refcheck);
if (result > 0) {
* mutex.
*/
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
struct lu_env *env;
struct cl_io *io;
int result;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
}
};
int result = 0;
- int refcheck;
+ u16 refcheck;
LASSERT(md->body->mbo_valid & OBD_MD_FLID);
LASSERT(S_ISREG(inode->i_mode));
struct lu_env *env;
struct ll_inode_info *lli = ll_i2info(inode);
struct cl_object *clob = lli->lli_clob;
- int refcheck;
+ u16 refcheck;
int emergency;
if (clob) {
struct cl_lock *lock;
struct cl_lock_descr *descr;
__u32 enqflags;
- int refcheck;
+ u16 refcheck;
int rc;
env = cl_env_get(&refcheck);
unsigned int attr_flags);
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);
void cl_inode_fini(struct inode *inode);
struct cl_io *io;
struct vvp_io *vio;
int result;
- int refcheck;
+ u16 refcheck;
sigset_t set;
struct inode *inode;
struct ll_inode_info *lli;
unsigned long ra_flags;
int result = 0;
int fault_ret = 0;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
struct lu_env *env;
long diff = 0;
long nrpages = 0;
- int refcheck;
+ u16 refcheck;
long pages_number;
int mult;
long rc;
bool redirtied = false;
bool unlocked = false;
int result;
- int refcheck;
+ u16 refcheck;
LASSERT(PageLocked(vmpage));
LASSERT(!PageWriteback(vmpage));
struct cl_device *cl;
struct lu_env *env;
int rc = 0;
- int refcheck;
+ u16 refcheck;
sbi = ll_s2sbi(sb);
env = cl_env_get(&refcheck);
struct ll_sb_info *sbi;
struct lu_env *env;
struct cl_device *cld;
- int refcheck;
+ u16 refcheck;
int result;
sbi = ll_s2sbi(sb);
struct cl_object *clob;
struct lu_env *env;
struct vvp_pgcache_id id;
- int refcheck;
+ u16 refcheck;
int result;
env = cl_env_get(&refcheck);
{
struct ll_sb_info *sbi;
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
sbi = f->private;
{
struct ll_sb_info *sbi;
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (!IS_ERR(env)) {
.cl_buf.lb_len = buf_size,
};
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
if (!obj)
return -ENODATA;
*
* \see cl_env_get()
*/
- int emrg_refcheck;
+ u16 emrg_refcheck;
};
struct lov_device {
* State that lov_io maintains for every sub-io.
*/
struct lov_io_sub {
- int 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;
+ u16 sub_stripe;
/**
- * Linkage into a list (hanging off lov_io::lis_active) of all
- * sub-io's active for the current IO iteration.
+ * environment's refcheck.
+ *
+ * \see cl_env_get()
*/
- struct list_head sub_linkage;
+ u16 sub_refcheck;
+ u16 sub_reenter;
/**
* true, iff cl_io_init() was successfully executed against
* 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
* 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.
- *
- * \see cl_env_get()
+ * 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;
+ /**
+ * environment, in which sub-io executes.
*/
- int sub_refcheck;
- int sub_refcheck2;
- int sub_reenter;
+ struct lu_env *sub_env;
};
/**
const struct lov_layout_operations *old_ops;
const struct lov_layout_operations *new_ops;
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
int rc;
LASSERT(0 <= lov->lo_type && lov->lo_type < ARRAY_SIZE(lov_dispatch));
*
* \see cl_env_put()
*/
-struct lu_env *cl_env_get(int *refcheck)
+struct lu_env *cl_env_get(u16 *refcheck)
{
struct lu_env *env;
*
* \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;
* this thread is using environment and it is returned to the allocation
* 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 echo_object *eco;
struct cl_object *obj;
struct lu_fid *fid;
- int refcheck;
+ u16 refcheck;
int rc;
LASSERTF(ostid_id(oi), DOSTID "\n", POSTID(oi));
{
struct lu_env *env;
struct cl_object *obj = echo_obj2cl(eco);
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
struct cl_page *clp;
struct lustre_handle lh = { 0 };
size_t page_size = cl_page_size(obj);
- int refcheck;
+ u16 refcheck;
int rc;
int i;
rc = atomic_long_read(&cli->cl_lru_in_list) - pages_number;
if (rc > 0) {
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
if (!IS_ERR(env)) {
int grants = 0;
int nr_pages = 0;
int rc = 0;
- int refcheck;
+ u16 refcheck;
LASSERT(sanity_check(ext) == 0);
EASSERT(ext->oe_state == OES_TRUNC, ext);
struct cl_lock_slice *slice = &oscl->ols_cl;
struct lu_env *env;
int rc;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
/* should never happen, similar to osc_ldlm_blocking_ast(). */
struct osc_object *osc = cookie;
struct ldlm_lock *dlmlock;
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
env = cl_env_get(&refcheck);
LASSERT(!IS_ERR(env));
enum cl_lock_mode mode, int discard)
{
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
int rc = 0;
int rc2 = 0;
}
case LDLM_CB_CANCELING: {
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
/*
* This can be called in the context of outer IO, e.g.,
struct req_capsule *cap;
struct cl_object *obj = NULL;
int result;
- int refcheck;
+ u16 refcheck;
LASSERT(lustre_msg_get_opc(req->rq_reqmsg) == LDLM_GL_CALLBACK);
struct osc_lock *oscl;
unsigned long weight;
bool found = false;
- int refcheck;
+ u16 refcheck;
might_sleep();
/*
struct lu_env *env;
struct cl_client_cache *cache = cli->cl_cache;
int max_scans;
- int refcheck;
+ u16 refcheck;
long rc = 0;
LASSERT(cache);
struct client_obd *cli;
struct lu_env *env;
long shrank = 0;
- int refcheck;
+ u16 refcheck;
int rc;
if (!sc->nr_to_scan)
case IMP_EVENT_INVALIDATE: {
struct ldlm_namespace *ns = obd->obd_namespace;
struct lu_env *env;
- int refcheck;
+ u16 refcheck;
ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);