Whamcloud - gitweb
LU-5478 mdc: get rid of obd_* typedefs 45/13145/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 19 Dec 2014 13:58:09 +0000 (16:58 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Dec 2014 18:11:51 +0000 (18:11 +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 4 in series: modify mdc/mdt/mgc

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I35b51c3e722f7463b7bab04a5fb2e19544b47178
Reviewed-on: http://review.whamcloud.com/13145
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_request.c
lustre/mdt/mdt_xattr.c
lustre/mgc/mgc_request.c

index 0f943b1..8202b8e 100644 (file)
@@ -446,16 +446,16 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp,
                                                       struct lookup_intent *it,
                                                       struct md_op_data *op_data)
 {
-       struct ptlrpc_request *req;
-       struct obd_device     *obddev = class_exp2obd(exp);
-       obd_valid              valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE |
-                                      OBD_MD_FLMODEASIZE | OBD_MD_FLDIREA |
-                                      OBD_MD_FLMDSCAPA | OBD_MD_MEA |
-                                      (client_is_remote(exp) ?
-                                              OBD_MD_FLRMTPERM : OBD_MD_FLACL);
-       struct ldlm_intent    *lit;
-       int                    rc;
-       __u32                   easize;
+       struct ptlrpc_request   *req;
+       struct obd_device       *obddev = class_exp2obd(exp);
+       u64                      valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE |
+                                        OBD_MD_FLMODEASIZE | OBD_MD_FLDIREA |
+                                        OBD_MD_FLMDSCAPA | OBD_MD_MEA |
+                                        (client_is_remote(exp) ?
+                                         OBD_MD_FLRMTPERM : OBD_MD_FLACL);
+       struct ldlm_intent      *lit;
+       int                      rc;
+       __u32                    easize;
        ENTRY;
 
         req = ptlrpc_request_alloc(class_exp2cliimp(exp),
index ffd5d57..dd025bc 100644 (file)
@@ -308,11 +308,11 @@ static int mdc_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
 }
 
 static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt,
-                            const struct lu_fid *fid,
-                            struct obd_capa *oc, int opcode, obd_valid valid,
-                            const char *xattr_name, const char *input,
-                            int input_size, int output_size, int flags,
-                            __u32 suppgid, struct ptlrpc_request **request)
+                           const struct lu_fid *fid,
+                           struct obd_capa *oc, int opcode, u64 valid,
+                           const char *xattr_name, const char *input,
+                           int input_size, int output_size, int flags,
+                           __u32 suppgid, struct ptlrpc_request **request)
 {
         struct ptlrpc_request *req;
         int   xattr_namelen = 0;
@@ -419,7 +419,7 @@ static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt,
 }
 
 static int mdc_setxattr(struct obd_export *exp, const struct lu_fid *fid,
-                       struct obd_capa *oc, obd_valid valid,
+                       struct obd_capa *oc, u64 valid,
                        const char *xattr_name,
                        const char *input, int input_size, int output_size,
                        int flags, __u32 suppgid,
@@ -432,7 +432,7 @@ static int mdc_setxattr(struct obd_export *exp, const struct lu_fid *fid,
 }
 
 static int mdc_getxattr(struct obd_export *exp, const struct lu_fid *fid,
-                       struct obd_capa *oc, obd_valid valid,
+                       struct obd_capa *oc, u64 valid,
                        const char *xattr_name,
                        const char *input, int input_size, int output_size,
                        int flags, struct ptlrpc_request **request)
@@ -2397,8 +2397,8 @@ out:
 }
 
 static int mdc_get_info_rpc(struct obd_export *exp,
-                           obd_count keylen, void *key,
-                           int vallen, void *val)
+                           u32 keylen, void *key,
+                           u32 vallen, void *val)
 {
         struct obd_import      *imp = class_exp2cliimp(exp);
         struct ptlrpc_request  *req;
@@ -2413,7 +2413,7 @@ static int mdc_get_info_rpc(struct obd_export *exp,
         req_capsule_set_size(&req->rq_pill, &RMF_GETINFO_KEY,
                              RCL_CLIENT, keylen);
         req_capsule_set_size(&req->rq_pill, &RMF_GETINFO_VALLEN,
-                             RCL_CLIENT, sizeof(__u32));
+                            RCL_CLIENT, sizeof(vallen));
 
         rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_GET_INFO);
         if (rc) {
@@ -2424,7 +2424,7 @@ static int mdc_get_info_rpc(struct obd_export *exp,
         tmp = req_capsule_client_get(&req->rq_pill, &RMF_GETINFO_KEY);
         memcpy(tmp, key, keylen);
         tmp = req_capsule_client_get(&req->rq_pill, &RMF_GETINFO_VALLEN);
-        memcpy(tmp, &vallen, sizeof(__u32));
+       memcpy(tmp, &vallen, sizeof(vallen));
 
         req_capsule_set_size(&req->rq_pill, &RMF_GETINFO_VAL,
                              RCL_SERVER, vallen);
@@ -2580,8 +2580,8 @@ static int mdc_kuc_reregister(struct obd_import *imp)
 
 static int mdc_set_info_async(const struct lu_env *env,
                              struct obd_export *exp,
-                             obd_count keylen, void *key,
-                             obd_count vallen, void *val,
+                             u32 keylen, void *key,
+                             u32 vallen, void *val,
                              struct ptlrpc_request_set *set)
 {
        struct obd_import       *imp = class_exp2cliimp(exp);
@@ -2631,7 +2631,8 @@ static int mdc_set_info_async(const struct lu_env *env,
 }
 
 static int mdc_get_info(const struct lu_env *env, struct obd_export *exp,
-                       __u32 keylen, void *key, __u32 *vallen, void *val,
+                       __u32 keylen, void *key,
+                       __u32 *vallen, void *val,
                        struct lov_stripe_md *lsm)
 {
        int rc = -EINVAL;
index 8364fab..47931b0 100644 (file)
@@ -229,7 +229,7 @@ int mdt_getxattr(struct mdt_thread_info *info)
         __u32                   remote = exp_connect_rmtclient(info->mti_exp);
         __u32                   perm;
         int                     easize, rc;
-       obd_valid               valid;
+       u64                     valid;
         ENTRY;
 
         LASSERT(info->mti_object != NULL);
index 744f4e3..089cfed 100644 (file)
@@ -1176,8 +1176,9 @@ static int mgc_target_register(struct obd_export *exp,
 }
 
 static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
-                             obd_count keylen, void *key, obd_count vallen,
-                             void *val, struct ptlrpc_request_set *set)
+                             u32 keylen, void *key,
+                             u32 vallen, void *val,
+                             struct ptlrpc_request_set *set)
 {
         int rc = -EINVAL;
         ENTRY;
@@ -1281,8 +1282,9 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
 }
 
 static int mgc_get_info(const struct lu_env *env, struct obd_export *exp,
-                        __u32 keylen, void *key, __u32 *vallen, void *val,
-                        struct lov_stripe_md *unused)
+                       __u32 keylen, void *key,
+                       __u32 *vallen, void *val,
+                       struct lov_stripe_md *unused)
 {
         int rc = -EINVAL;