* @{ */
struct cl_env_nest {
- int cen_refcheck;
- void *cen_cookie;
+ __u16 cen_refcheck;
+ void *cen_cookie;
};
-struct lu_env *cl_env_peek (int *refcheck);
-struct lu_env *cl_env_get (int *refcheck);
-struct lu_env *cl_env_alloc (int *refcheck, __u32 tags);
-struct lu_env *cl_env_nested_get (struct cl_env_nest *nest);
-void cl_env_put (struct lu_env *env, int *refcheck);
-void cl_env_nested_put (struct cl_env_nest *nest, struct lu_env *env);
-void *cl_env_reenter (void);
-void cl_env_reexit (void *cookie);
-void cl_env_implant (struct lu_env *env, int *refcheck);
-void cl_env_unplant (struct lu_env *env, int *refcheck);
-unsigned cl_env_cache_purge(unsigned nr);
-struct lu_env *cl_env_percpu_get (void);
-void cl_env_percpu_put (struct lu_env *env);
+struct lu_env *cl_env_peek(__u16 *refcheck);
+struct lu_env *cl_env_get(__u16 *refcheck);
+struct lu_env *cl_env_alloc(__u16 *refcheck, __u32 tags);
+struct lu_env *cl_env_nested_get(struct cl_env_nest *nest);
+void cl_env_put(struct lu_env *env, __u16 *refcheck);
+void cl_env_nested_put(struct cl_env_nest *nest, struct lu_env *env);
+void *cl_env_reenter(void);
+void cl_env_reexit(void *cookie);
+void cl_env_implant(struct lu_env *env, __u16 *refcheck);
+void cl_env_unplant(struct lu_env *env, __u16 *refcheck);
+unsigned cl_env_cache_purge(unsigned nr);
+struct lu_env *cl_env_percpu_get(void);
+void cl_env_percpu_put(struct lu_env *env);
/** @} cl_env */
static int find_cbdata(struct inode *inode)
{
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
struct ll_sb_info *sbi = ll_i2sbi(inode);
int rc = 0;
ENTRY;
struct vvp_io_args *args;
struct lu_env *env;
ssize_t result;
- int refcheck;
+ __u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
struct vvp_io_args *args;
struct lu_env *env;
ssize_t result;
- int refcheck;
+ __u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
if (nr_segs == 1) {
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
struct iovec iov = { .iov_base = buf, .iov_len = count };
struct kiocb *kiocb;
ssize_t result;
- int refcheck;
+ __u16 refcheck;
ENTRY;
env = cl_env_get(&refcheck);
if (nr_segs == 1) {
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
.iov_len = count };
struct kiocb *kiocb;
ssize_t result;
- int refcheck;
+ __u16 refcheck;
ENTRY;
env = cl_env_get(&refcheck);
struct lu_env *env;
struct vvp_io_args *args;
ssize_t result;
- int refcheck;
+ __u16 refcheck;
ENTRY;
env = cl_env_get(&refcheck);
struct lov_user_md __user *lum)
{
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
int rc;
ENTRY;
size_t num_bytes)
{
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
int rc = 0;
struct ll_fiemap_info_key fmkey = { .lfik_name = KEY_FIEMAP, };
ENTRY;
struct cl_object *obj = ll_i2info(inode)->lli_clob;
struct lu_env *env;
struct cl_io *io;
- int refcheck;
+ __u16 refcheck;
int result;
ENTRY;
}
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;
+ __u16 refcheck;
int result;
- int refcheck;
ENTRY;
* 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;
ENTRY;
}
};
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 != NULL) {
struct cl_lock *lock;
struct cl_lock_descr *descr;
__u32 enqflags;
- int refcheck;
+ __u16 refcheck;
int rc;
env = cl_env_get(&refcheck);
struct lu_env *env = lg->lg_env;
struct cl_io *io = lg->lg_io;
struct cl_lock *lock = lg->lg_lock;
- int refcheck;
+ __u16 refcheck;
LASSERT(lg->lg_env != NULL);
LASSERT(lg->lg_gid != 0);
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);
unsigned long total_count = 0;
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
int ret = 0;
set_user_nice(current, -20);
long diff = 0;
long nrpages = 0;
long pages_number;
- int refcheck;
+ __u16 refcheck;
int mult;
long rc;
char kernbuf[128];
struct cl_page *page;
struct cl_object *obj;
- int refcheck;
+ __u16 refcheck;
LASSERT(PageLocked(vmpage));
LASSERT(!PageWriteback(vmpage));
ssize_t count = iov_iter_count(iter);
ssize_t tot_bytes = 0, result = 0;
size_t size = MAX_DIO_SIZE;
- int refcheck;
+ __u16 refcheck;
/* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */
if ((file_offset & ~PAGE_MASK) || (count & ~PAGE_MASK))
ssize_t tot_bytes = 0, result = 0;
unsigned long seg = 0;
size_t size = MAX_DIO_SIZE;
- int refcheck;
+ __u16 refcheck;
ENTRY;
/* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */
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;
ENTRY;
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_buf = buf,
.cl_buf.lb_len = buf_size,
};
- int refcheck;
+ __u16 refcheck;
if (obj == NULL)
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;
- /**
- * Linkage into a list (hanging off lov_io::lis_active) of all
- * sub-io's active for the current IO iteration.
- */
+ __u16 sub_stripe;
+ /**
+ * environment's refcheck.
+ *
+ * \see cl_env_get()
+ */
+ __u16 sub_refcheck;
+ __u16 sub_reenter;
+ /**
+ * true, iff cl_io_init() was successfully executed against
+ * lov_io_sub::sub_io.
+ */
+ __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.
+ */
+ sub_borrowed:1;
+ /**
+ * Linkage into a list (hanging off lov_io::lis_active) of all
+ * sub-io's active for the current IO iteration.
+ */
struct list_head sub_linkage;
- /**
- * true, iff cl_io_init() was successfully executed against
- * lov_io_sub::sub_io.
- */
- int sub_io_initialized;
- /**
- * 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;
- /**
- * environment, in which sub-io executes.
- */
- struct lu_env *sub_env;
- /**
- * environment's refcheck.
- *
- * \see cl_env_get()
- */
- int sub_refcheck;
- int sub_refcheck2;
- int sub_reenter;
+ /**
+ * 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.
+ */
+ struct lu_env *sub_env;
};
/**
const struct lov_layout_operations *new_ops;
void *cookie;
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
int rc;
ENTRY;
return container_of(env, struct cl_env, ce_lu);
}
-struct lu_env *cl_env_peek(int *refcheck)
+struct lu_env *cl_env_peek(__u16 *refcheck)
{
struct lu_env *env;
struct cl_env *cle;
*
* \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;
*
* \see cl_env_unplant()
*/
-void cl_env_implant(struct lu_env *env, int *refcheck)
+void cl_env_implant(struct lu_env *env, __u16 *refcheck)
{
struct cl_env *cle = cl_env_container(env);
/**
* Detach environment installed earlier by cl_env_implant().
*/
-void cl_env_unplant(struct lu_env *env, int *refcheck)
+void cl_env_unplant(struct lu_env *env, __u16 *refcheck)
{
struct cl_env *cle = cl_env_container(env);
struct cl_object *obj;
struct lov_oinfo *oinfo = NULL;
struct lu_fid *fid;
- int refcheck;
+ __u16 refcheck;
int rc;
ENTRY;
{
struct lu_env *env;
struct cl_object *obj = echo_obj2cl(eco);
- int refcheck;
+ __u16 refcheck;
ENTRY;
env = cl_env_get(&refcheck);
struct cl_page *clp;
struct lustre_handle lh = { 0 };
int page_size = cl_page_size(obj);
- int refcheck;
int rc;
int i;
+ __u16 refcheck;
ENTRY;
LASSERT((offset & ~PAGE_MASK) == 0);
struct echo_thread_info *info;
struct lu_device *ld = ed->ed_next;
struct lu_env *env;
- int refcheck;
+ __u16 refcheck;
struct lu_object *parent;
char *name = NULL;
int namelen = data->ioc_plen2;
}
case OBD_IOC_ECHO_ALLOC_SEQ: {
struct lu_env *cl_env;
- int refcheck;
+ __u16 refcheck;
__u64 seq;
int max_count;
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)) {
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);