Whamcloud - gitweb
LU-7085 lov: trying smaller memory allocations 76/17476/4
authorYang Sheng <yang.sheng@intel.com>
Fri, 4 Dec 2015 06:28:33 +0000 (14:28 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 7 Jan 2016 01:48:20 +0000 (01:48 +0000)
Reduce struct lov_io_sub to smaller memory usage
on wide-stripe file systems.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ie92cec079f6514efca71663af1ae6ae1e34c73cb
Reviewed-on: http://review.whamcloud.com/17476
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
18 files changed:
lustre/include/cl_object.h
lustre/llite/dcache.c
lustre/llite/file.c
lustre/llite/glimpse.c
lustre/llite/lcommon_cl.c
lustre/llite/lcommon_misc.c
lustre/llite/llite_internal.h
lustre/llite/lloop.c
lustre/llite/lproc_llite.c
lustre/llite/rw26.c
lustre/llite/vvp_dev.c
lustre/llite/xattr.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_object.c
lustre/obdclass/cl_object.c
lustre/obdecho/echo_client.c
lustre/osc/lproc_osc.c
lustre/osc/osc_request.c

index d45aacc..4de3d2e 100644 (file)
@@ -2453,23 +2453,23 @@ void cl_sync_io_end(const struct lu_env *env, struct cl_sync_io *anchor);
  * @{ */
 
 struct cl_env_nest {
  * @{ */
 
 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 */
 
 
 /** @} cl_env */
 
index fc3343e..4ec4421 100644 (file)
@@ -138,7 +138,7 @@ static inline int return_if_equal(struct ldlm_lock *lock, void *data)
 static int find_cbdata(struct inode *inode)
 {
        struct lu_env                   *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 ll_sb_info               *sbi = ll_i2sbi(inode);
        int                             rc = 0;
        ENTRY;
index 285e360..0592d26 100644 (file)
@@ -1175,7 +1175,7 @@ static ssize_t ll_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
        struct vvp_io_args *args;
        struct lu_env *env;
        ssize_t result;
        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))
 
        env = cl_env_get(&refcheck);
        if (IS_ERR(env))
@@ -1199,7 +1199,7 @@ static ssize_t ll_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
        struct vvp_io_args *args;
        struct lu_env *env;
        ssize_t result;
        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))
 
        env = cl_env_get(&refcheck);
        if (IS_ERR(env))
@@ -1262,7 +1262,7 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 
        if (nr_segs == 1) {
                struct lu_env *env;
 
        if (nr_segs == 1) {
                struct lu_env *env;
-               int refcheck;
+               __u16 refcheck;
 
                env = cl_env_get(&refcheck);
                if (IS_ERR(env))
 
                env = cl_env_get(&refcheck);
                if (IS_ERR(env))
@@ -1308,7 +1308,7 @@ static ssize_t ll_file_read(struct file *file, char __user *buf, size_t count,
        struct iovec   iov = { .iov_base = buf, .iov_len = count };
         struct kiocb  *kiocb;
         ssize_t        result;
        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);
         ENTRY;
 
         env = cl_env_get(&refcheck);
@@ -1350,7 +1350,7 @@ static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 
        if (nr_segs == 1) {
                struct lu_env *env;
 
        if (nr_segs == 1) {
                struct lu_env *env;
-               int refcheck;
+               __u16 refcheck;
 
                env = cl_env_get(&refcheck);
                if (IS_ERR(env))
 
                env = cl_env_get(&refcheck);
                if (IS_ERR(env))
@@ -1397,7 +1397,7 @@ static ssize_t ll_file_write(struct file *file, const char __user *buf,
                               .iov_len = count };
         struct kiocb  *kiocb;
         ssize_t        result;
                               .iov_len = count };
         struct kiocb  *kiocb;
         ssize_t        result;
-        int            refcheck;
+       __u16          refcheck;
         ENTRY;
 
         env = cl_env_get(&refcheck);
         ENTRY;
 
         env = cl_env_get(&refcheck);
@@ -1431,7 +1431,7 @@ static ssize_t ll_file_splice_read(struct file *in_file, loff_t *ppos,
         struct lu_env      *env;
         struct vvp_io_args *args;
         ssize_t             result;
         struct lu_env      *env;
         struct vvp_io_args *args;
         ssize_t             result;
-        int                 refcheck;
+       __u16               refcheck;
         ENTRY;
 
         env = cl_env_get(&refcheck);
         ENTRY;
 
         env = cl_env_get(&refcheck);
@@ -1590,7 +1590,7 @@ static int ll_file_getstripe(struct inode *inode,
                             struct lov_user_md __user *lum)
 {
        struct lu_env   *env;
                             struct lov_user_md __user *lum)
 {
        struct lu_env   *env;
-       int             refcheck;
+       __u16           refcheck;
        int             rc;
        ENTRY;
 
        int             rc;
        ENTRY;
 
@@ -1768,7 +1768,7 @@ static int ll_do_fiemap(struct inode *inode, struct fiemap *fiemap,
                        size_t num_bytes)
 {
        struct lu_env                   *env;
                        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;
        int                             rc = 0;
        struct ll_fiemap_info_key       fmkey = { .lfik_name = KEY_FIEMAP, };
        ENTRY;
@@ -1874,7 +1874,7 @@ int ll_data_version(struct inode *inode, __u64 *data_version, int flags)
        struct cl_object *obj = ll_i2info(inode)->lli_clob;
        struct lu_env *env;
        struct cl_io *io;
        struct cl_object *obj = ll_i2info(inode)->lli_clob;
        struct lu_env *env;
        struct cl_io *io;
-       int refcheck;
+       __u16  refcheck;
        int result;
 
        ENTRY;
        int result;
 
        ENTRY;
index d374c81..f0751e7 100644 (file)
@@ -145,7 +145,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 cl_io            *io;
 {
        struct lu_env           *env;
        struct cl_io            *io;
@@ -182,8 +182,8 @@ int cl_glimpse_size0(struct inode *inode, int agl)
          */
         struct lu_env          *env = NULL;
         struct cl_io           *io  = NULL;
          */
         struct lu_env          *env = NULL;
         struct cl_io           *io  = NULL;
+       __u16                   refcheck;
         int                     result;
         int                     result;
-        int                     refcheck;
 
         ENTRY;
 
 
         ENTRY;
 
index 6433bb7..673bfbd 100644 (file)
@@ -64,7 +64,7 @@
  * mutex.
  */
 struct lu_env *cl_inode_fini_env;
  * 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
 
 /**
  * A mutex serializing calls to slp_inode_fini() under extreme memory
@@ -78,7 +78,7 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr,
         struct lu_env *env;
         struct cl_io  *io;
         int            result;
         struct lu_env *env;
         struct cl_io  *io;
         int            result;
-        int            refcheck;
+       __u16          refcheck;
 
         ENTRY;
 
 
         ENTRY;
 
@@ -142,7 +142,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(S_ISREG(inode->i_mode));
 
        LASSERT(md->body->mbo_valid & OBD_MD_FLID);
        LASSERT(S_ISREG(inode->i_mode));
@@ -228,7 +228,7 @@ void cl_inode_fini(struct inode *inode)
        struct lu_env           *env;
        struct ll_inode_info    *lli  = ll_i2info(inode);
         struct cl_object        *clob = lli->lli_clob;
        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) {
         int emergency;
 
         if (clob != NULL) {
index 5f7eaaf..43e243c 100644 (file)
@@ -126,7 +126,7 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
         struct cl_lock         *lock;
         struct cl_lock_descr   *descr;
         __u32                   enqflags;
         struct cl_lock         *lock;
         struct cl_lock_descr   *descr;
         __u32                   enqflags;
-        int                     refcheck;
+       __u16                   refcheck;
         int                     rc;
 
         env = cl_env_get(&refcheck);
         int                     rc;
 
         env = cl_env_get(&refcheck);
@@ -180,7 +180,7 @@ void cl_put_grouplock(struct ll_grouplock *lg)
        struct lu_env  *env  = lg->lg_env;
        struct cl_io   *io   = lg->lg_io;
        struct cl_lock *lock = lg->lg_lock;
        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);
 
        LASSERT(lg->lg_env != NULL);
        LASSERT(lg->lg_gid != 0);
index 1b0a8ee..15530dc 100644 (file)
@@ -1490,7 +1490,7 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr,
                   unsigned int attr_flags);
 
 extern struct lu_env *cl_inode_fini_env;
                   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);
 
 int cl_file_inode_init(struct inode *inode, struct lustre_md *md);
 void cl_inode_fini(struct inode *inode);
index 3bf9bf4..f3b9288 100644 (file)
@@ -450,7 +450,7 @@ static int loop_thread(void *data)
         unsigned long total_count = 0;
 
         struct lu_env *env;
         unsigned long total_count = 0;
 
         struct lu_env *env;
-        int refcheck;
+       __u16 refcheck;
         int ret = 0;
 
         set_user_nice(current, -20);
         int ret = 0;
 
         set_user_nice(current, -20);
index 53dd7ac..e631f50 100644 (file)
@@ -433,7 +433,7 @@ ll_max_cached_mb_seq_write(struct file *file, const char __user *buffer,
        long diff = 0;
        long nrpages = 0;
        long pages_number;
        long diff = 0;
        long nrpages = 0;
        long pages_number;
-       int refcheck;
+       __u16 refcheck;
        int mult;
        long rc;
        char kernbuf[128];
        int mult;
        long rc;
        char kernbuf[128];
index 83fa263..b2d6e31 100644 (file)
@@ -88,7 +88,7 @@ static void ll_invalidatepage(struct page *vmpage,
         struct cl_page   *page;
         struct cl_object *obj;
 
         struct cl_page   *page;
         struct cl_object *obj;
 
-        int refcheck;
+       __u16 refcheck;
 
         LASSERT(PageLocked(vmpage));
         LASSERT(!PageWriteback(vmpage));
 
         LASSERT(PageLocked(vmpage));
         LASSERT(!PageWriteback(vmpage));
@@ -362,7 +362,7 @@ ll_direct_IO(
        ssize_t count = iov_iter_count(iter);
        ssize_t tot_bytes = 0, result = 0;
        size_t size = MAX_DIO_SIZE;
        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))
 
        /* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */
        if ((file_offset & ~PAGE_MASK) || (count & ~PAGE_MASK))
@@ -495,7 +495,7 @@ ll_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
        ssize_t tot_bytes = 0, result = 0;
        unsigned long seg = 0;
        size_t size = MAX_DIO_SIZE;
        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 ??? */
        ENTRY;
 
         /* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */
index d0b03a5..61b8bb9 100644 (file)
@@ -317,7 +317,7 @@ int cl_sb_init(struct super_block *sb)
         struct cl_device  *cl;
         struct lu_env     *env;
         int rc = 0;
         struct cl_device  *cl;
         struct lu_env     *env;
         int rc = 0;
-        int refcheck;
+       __u16 refcheck;
 
         sbi  = ll_s2sbi(sb);
         env = cl_env_get(&refcheck);
 
         sbi  = ll_s2sbi(sb);
         env = cl_env_get(&refcheck);
@@ -339,7 +339,7 @@ int cl_sb_fini(struct super_block *sb)
         struct ll_sb_info *sbi;
         struct lu_env     *env;
         struct cl_device  *cld;
         struct ll_sb_info *sbi;
         struct lu_env     *env;
         struct cl_device  *cld;
-        int                refcheck;
+       __u16              refcheck;
         int                result;
 
         ENTRY;
         int                result;
 
         ENTRY;
@@ -541,7 +541,7 @@ static int vvp_pgcache_show(struct seq_file *f, void *v)
        struct cl_object        *clob;
        struct lu_env           *env;
        struct vvp_pgcache_id    id;
        struct cl_object        *clob;
        struct lu_env           *env;
        struct vvp_pgcache_id    id;
-       int                      refcheck;
+       __u16                    refcheck;
        int                      result;
 
        env = cl_env_get(&refcheck);
        int                      result;
 
        env = cl_env_get(&refcheck);
@@ -587,7 +587,7 @@ static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos)
 {
         struct ll_sb_info *sbi;
         struct lu_env     *env;
 {
         struct ll_sb_info *sbi;
         struct lu_env     *env;
-        int                refcheck;
+       __u16              refcheck;
 
         sbi = f->private;
 
 
         sbi = f->private;
 
@@ -611,7 +611,7 @@ static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos)
 {
         struct ll_sb_info *sbi;
         struct lu_env     *env;
 {
         struct ll_sb_info *sbi;
         struct lu_env     *env;
-        int                refcheck;
+       __u16              refcheck;
 
         env = cl_env_get(&refcheck);
         if (!IS_ERR(env)) {
 
         env = cl_env_get(&refcheck);
         if (!IS_ERR(env)) {
index 66125d7..6e282af 100644 (file)
@@ -529,7 +529,7 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
                        .cl_buf.lb_buf = buf,
                        .cl_buf.lb_len = buf_size,
                };
                        .cl_buf.lb_buf = buf,
                        .cl_buf.lb_len = buf_size,
                };
-               int refcheck;
+               __u16 refcheck;
 
                if (obj == NULL)
                        RETURN(-ENODATA);
 
                if (obj == NULL)
                        RETURN(-ENODATA);
index 1cac50a..cde1ff4 100644 (file)
@@ -121,7 +121,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 {
@@ -381,40 +381,39 @@ struct lov_thread_info {
  * State that lov_io maintains for every sub-io.
  */
 struct lov_io_sub {
  * 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;
        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;
 };
 
 /**
 };
 
 /**
index f731146..1f2ccca 100644 (file)
@@ -772,7 +772,7 @@ static int lov_layout_change(const struct lu_env *unused,
        const struct lov_layout_operations *new_ops;
        void *cookie;
        struct lu_env *env;
        const struct lov_layout_operations *new_ops;
        void *cookie;
        struct lu_env *env;
-       int refcheck;
+       __u16 refcheck;
        int rc;
        ENTRY;
 
        int rc;
        ENTRY;
 
index 19c17f8..d34b431 100644 (file)
@@ -893,7 +893,7 @@ static inline struct cl_env *cl_env_container(struct lu_env *env)
         return container_of(env, struct cl_env, ce_lu);
 }
 
         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;
 {
         struct lu_env *env;
         struct cl_env *cle;
@@ -927,7 +927,7 @@ struct lu_env *cl_env_peek(int *refcheck)
  *
  * \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;
 
@@ -952,7 +952,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;
 
@@ -1010,7 +1010,7 @@ EXPORT_SYMBOL(cl_env_cache_purge);
  * this thread is using environment and it is returned to the allocation
  * cache, or freed straight away, if cache is large enough.
  */
  * 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 cl_env *cle;
 
@@ -1072,7 +1072,7 @@ EXPORT_SYMBOL(cl_env_reexit);
  *
  * \see cl_env_unplant()
  */
  *
  * \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);
 
 {
         struct cl_env *cle = cl_env_container(env);
 
@@ -1087,7 +1087,7 @@ EXPORT_SYMBOL(cl_env_implant);
 /**
  * Detach environment installed earlier by cl_env_implant().
  */
 /**
  * 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_env *cle = cl_env_container(env);
 
index f936795..d47bc16 100644 (file)
@@ -1115,7 +1115,7 @@ cl_echo_object_find(struct echo_device *d, const struct ost_id *oi)
        struct cl_object *obj;
        struct lov_oinfo *oinfo = NULL;
        struct lu_fid *fid;
        struct cl_object *obj;
        struct lov_oinfo *oinfo = NULL;
        struct lu_fid *fid;
-       int refcheck;
+       __u16  refcheck;
        int rc;
        ENTRY;
 
        int rc;
        ENTRY;
 
@@ -1175,7 +1175,7 @@ static int cl_echo_object_put(struct echo_object *eco)
 {
         struct lu_env *env;
         struct cl_object *obj = echo_obj2cl(eco);
 {
         struct lu_env *env;
         struct cl_object *obj = echo_obj2cl(eco);
-        int refcheck;
+       __u16  refcheck;
         ENTRY;
 
         env = cl_env_get(&refcheck);
         ENTRY;
 
         env = cl_env_get(&refcheck);
@@ -1295,9 +1295,9 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset,
         struct cl_page          *clp;
         struct lustre_handle    lh = { 0 };
         int page_size = cl_page_size(obj);
         struct cl_page          *clp;
         struct lustre_handle    lh = { 0 };
         int page_size = cl_page_size(obj);
-        int refcheck;
         int rc;
         int i;
         int rc;
         int i;
+       __u16 refcheck;
         ENTRY;
 
        LASSERT((offset & ~PAGE_MASK) == 0);
         ENTRY;
 
        LASSERT((offset & ~PAGE_MASK) == 0);
@@ -2060,7 +2060,7 @@ static int echo_md_handler(struct echo_device *ed, int command,
        struct echo_thread_info *info;
         struct lu_device      *ld = ed->ed_next;
         struct lu_env         *env;
        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;
         struct lu_object      *parent;
         char                  *name = NULL;
         int                    namelen = data->ioc_plen2;
@@ -2644,7 +2644,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
        }
         case OBD_IOC_ECHO_ALLOC_SEQ: {
                 struct lu_env   *cl_env;
        }
         case OBD_IOC_ECHO_ALLOC_SEQ: {
                 struct lu_env   *cl_env;
-                int              refcheck;
+               __u16            refcheck;
                 __u64            seq;
                 int              max_count;
 
                 __u64            seq;
                 int              max_count;
 
index a98ef84..983442f 100644 (file)
@@ -231,7 +231,7 @@ osc_cached_mb_seq_write(struct file *file, const char __user *buffer,
        rc = atomic_long_read(&cli->cl_lru_in_list) - pages_number;
        if (rc > 0) {
                struct lu_env *env;
        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)) {
 
                env = cl_env_get(&refcheck);
                if (!IS_ERR(env)) {
index ee7d04a..2ab31b4 100644 (file)
@@ -2533,7 +2533,7 @@ static int osc_import_event(struct obd_device *obd,
         case IMP_EVENT_INVALIDATE: {
                 struct ldlm_namespace *ns = obd->obd_namespace;
                 struct lu_env         *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);
 
 
                ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);