Whamcloud - gitweb
LU-5478 llite: get rid of obd_* typedefs 43/13143/3
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 19 Dec 2014 13:28:54 +0000 (16:28 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 9 Jan 2015 03:10:42 +0000 (03:10 +0000)
We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

patch 2 in series: modify llite

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Idfa717f29cb47e4dd8c05cc956be3fb883cb1ba7
Reviewed-on: http://review.whamcloud.com/13143
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/lcommon_cl.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/llite_rmtacl.c
lustre/llite/lloop.c

index 8af20a0..d44eca7 100644 (file)
@@ -576,7 +576,7 @@ end:
  * Each time, it can only retrieve 1 stripe EA
  **/
 int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size,
-                    struct ptlrpc_request **request, obd_valid valid)
+                    struct ptlrpc_request **request, u64 valid)
 {
        struct ll_sb_info *sbi = ll_i2sbi(inode);
        struct mdt_body   *body;
@@ -1208,7 +1208,7 @@ lmv_out_free:
                struct ptlrpc_request   *request = NULL;
                union lmv_mds_md        *lmm = NULL;
                int                     lmmsize;
-               obd_valid               valid = 0;
+               u64                     valid = 0;
                struct lmv_user_md      *tmp = NULL;
                int                     mdt_index;
                int                     lum_size;
@@ -1617,7 +1617,7 @@ out_rmdir:
         }
 #endif
         case LL_IOC_GETOBDCOUNT: {
-                int count, vallen;
+               u32 count, vallen;
                 struct obd_export *exp;
 
                if (copy_from_user(&count, (int __user *)arg, sizeof(int)))
index a0f64ce..e4bed5d 100644 (file)
@@ -1014,9 +1014,9 @@ int ll_merge_attr(const struct lu_env *env, struct inode *inode)
        struct ll_inode_info *lli = ll_i2info(inode);
        struct cl_object *obj = lli->lli_clob;
        struct cl_attr *attr = ccc_env_thread_attr(env);
-       obd_time atime;
-       obd_time mtime;
-       obd_time ctime;
+       s64 atime;
+       s64 mtime;
+       s64 ctime;
        int rc = 0;
 
        ENTRY;
@@ -3228,10 +3228,10 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
 
                 ll_lookup_finish_locks(&oit, dentry);
         } else if (!ll_have_md_lock(dentry->d_inode, &ibits, LCK_MINMODE)) {
-                struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
-                obd_valid valid = OBD_MD_FLGETATTR;
-                struct md_op_data *op_data;
-                int ealen = 0;
+               struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
+               u64 valid = OBD_MD_FLGETATTR;
+               struct md_op_data *op_data;
+               int ealen = 0;
 
                if (S_ISREG(inode->i_mode)) {
                        rc = ll_get_default_mdsize(sbi, &ealen);
index 8630e50..f7a47ed 100644 (file)
@@ -487,13 +487,13 @@ void ccc_req_completion(const struct lu_env *env,
  *  and capability.
  */
 void ccc_req_attr_set(const struct lu_env *env,
-                      const struct cl_req_slice *slice,
-                      const struct cl_object *obj,
-                      struct cl_req_attr *attr, obd_valid flags)
+                     const struct cl_req_slice *slice,
+                     const struct cl_object *obj,
+                     struct cl_req_attr *attr, u64 flags)
 {
-        struct inode *inode;
-        struct obdo  *oa;
-        obd_flag      valid_flags;
+       struct inode    *inode;
+       struct obdo     *oa;
+       u32              valid_flags;
 
        oa = attr->cra_oa;
        inode = vvp_object_inode(obj);
index f54d95f..f9e0086 100644 (file)
@@ -173,9 +173,9 @@ struct ll_inode_info {
        struct inode                    lli_vfs_inode;
 
        /* the most recent timestamps obtained from mds */
-       obd_time                        lli_atime;
-       obd_time                        lli_mtime;
-       obd_time                        lli_ctime;
+       s64                             lli_atime;
+       s64                             lli_mtime;
+       s64                             lli_ctime;
        spinlock_t                      lli_agl_lock;
 
        /* Try to make the d::member and f::member are aligned. Before using
@@ -876,7 +876,7 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,
                      int set_default);
 int ll_dir_getstripe(struct inode *inode, void **lmmp,
                     int *lmm_size, struct ptlrpc_request **request,
-                    obd_valid valid);
+                    u64 valid);
 #ifdef HAVE_FILE_FSYNC_4ARGS
 int ll_fsync(struct file *file, loff_t start, loff_t end, int data);
 #elif defined(HAVE_FILE_FSYNC_2ARGS)
@@ -1259,7 +1259,7 @@ void ll_ra_stats_inc(struct inode *inode, enum ra_stat which);
 
 /* llite/llite_rmtacl.c */
 #ifdef CONFIG_FS_POSIX_ACL
-obd_valid rce_ops2valid(int ops);
+u64 rce_ops2valid(int ops);
 struct rmtacl_ctl_entry *rct_search(struct rmtacl_ctl_table *rct, pid_t key);
 int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops);
 int rct_del(struct rmtacl_ctl_table *rct, pid_t key);
index ee14f15..9330a85 100644 (file)
@@ -180,7 +180,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
         struct obd_uuid *uuid;
         struct md_op_data *op_data;
         struct lustre_md lmd;
-        obd_valid valid;
+       u64 valid;
         int size, err, checksum;
         ENTRY;
 
index a4f60a3..7188a49 100644 (file)
@@ -57,7 +57,7 @@ static inline __u32 ee_hashfunc(uid_t id)
         return id & (EE_HASHES - 1);
 }
 
-obd_valid rce_ops2valid(int ops)
+u64 rce_ops2valid(int ops)
 {
         switch (ops) {
         case RMT_LSETFACL:
index e220cd1..f3bf6de 100644 (file)
@@ -199,7 +199,7 @@ static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head)
        struct bio_vec       *bvec;
 #endif
         int                   rw;
-        obd_count             page_count = 0;
+       size_t                page_count = 0;
         struct bio           *bio;
         ssize_t               bytes;