Whamcloud - gitweb
LU-5478 utils: get rid of obd_* typedefs 50/13150/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 19 Dec 2014 14:49:06 +0000 (17:49 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Dec 2014 18:12:36 +0000 (18:12 +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 8 in series: modify utils and ptlrpc

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I618e6e8465c845951f4735ac7ff2743544534809
Reviewed-on: http://review.whamcloud.com/13150
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/ptlrpc/layout.c
lustre/ptlrpc/pack_generic.c
lustre/target/tgt_handler.c
lustre/utils/obd.c

index e11c9fe..bef1acb 100644 (file)
@@ -1118,8 +1118,8 @@ struct req_msg_field RMF_EAVALS_LENS =
 EXPORT_SYMBOL(RMF_EAVALS_LENS);
 
 struct req_msg_field RMF_OBD_ID =
-        DEFINE_MSGF("obd_id", 0,
-                    sizeof(obd_id), lustre_swab_ost_last_id, NULL);
+       DEFINE_MSGF("obd_id", 0,
+                   sizeof(__u64), lustre_swab_ost_last_id, NULL);
 EXPORT_SYMBOL(RMF_OBD_ID);
 
 struct req_msg_field RMF_FID =
index 749deb0..4a7c72a 100644 (file)
@@ -1804,7 +1804,7 @@ void lustre_swab_ost_body (struct ost_body *b)
 }
 EXPORT_SYMBOL(lustre_swab_ost_body);
 
-void lustre_swab_ost_last_id(obd_id *id)
+void lustre_swab_ost_last_id(u64 *id)
 {
         __swab64s(id);
 }
index b96d89f..262e503 100644 (file)
@@ -134,8 +134,8 @@ static int tgt_mdt_body_unpack(struct tgt_session_info *tsi, __u32 flags)
 int tgt_validate_obdo(struct tgt_session_info *tsi, struct obdo *oa)
 {
        struct ost_id   *oi     = &oa->o_oi;
-       obd_seq          seq    = ostid_seq(oi);
-       obd_id           id     = ostid_id(oi);
+       u64              seq    = ostid_seq(oi);
+       u64              id     = ostid_id(oi);
        int              rc;
        ENTRY;
 
@@ -1847,7 +1847,7 @@ EXPORT_SYMBOL(tgt_brw_read);
 static void tgt_warn_on_cksum(struct ptlrpc_request *req,
                              struct ptlrpc_bulk_desc *desc,
                              struct niobuf_local *local_nb, int npages,
-                             obd_count client_cksum, obd_count server_cksum,
+                             u32 client_cksum, u32 server_cksum,
                              bool mmap)
 {
        struct obd_export *exp = req->rq_export;
index 20ec5f4..e049f47 100644 (file)
@@ -1061,9 +1061,9 @@ int jt_obd_list(int argc, char **argv)
 }
 
 struct jt_fid_space {
-        obd_seq jt_seq;
-        obd_id  jt_id;
-        int     jt_width;
+       __u64   jt_seq;
+       __u64   jt_id;
+       int     jt_width;
 };
 
 int jt_obd_alloc_fids(struct jt_fid_space *space, struct lu_fid *fid,
@@ -1570,10 +1570,10 @@ int jt_obd_test_setattr(int argc, char **argv)
 {
         struct obd_ioctl_data data;
         struct timeval start, next_time;
-        __u64 i, count, next_count;
+       __u64 i, count, next_count;
         char rawbuf[MAX_IOC_BUFLEN], *buf = rawbuf;
         int verbose = 1;
-        obd_id objid = 3;
+       __u64 objid = 3;
         char *end;
         int rc = 0;
 
@@ -1780,9 +1780,9 @@ int jt_obd_test_getattr(int argc, char **argv)
         struct obd_ioctl_data data;
         struct timeval start, next_time;
         char rawbuf[MAX_IOC_BUFLEN], *buf = rawbuf;
-        __u64 i, count, next_count;
+       __u64 i, count, next_count;
         int verbose = 1;
-        obd_id objid = 3;
+       __u64 objid = 3;
         char *end;
         int rc = 0;