From 91123dfcae62ba82e4d51e198c72cba0002708e5 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Fri, 19 Dec 2014 17:49:06 +0300 Subject: [PATCH] LU-5478 utils: get rid of obd_* typedefs 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 Signed-off-by: Dmitry Eremin Change-Id: I618e6e8465c845951f4735ac7ff2743544534809 Reviewed-on: http://review.whamcloud.com/13150 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: James Simmons --- lustre/ptlrpc/layout.c | 4 ++-- lustre/ptlrpc/pack_generic.c | 2 +- lustre/target/tgt_handler.c | 6 +++--- lustre/utils/obd.c | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lustre/ptlrpc/layout.c b/lustre/ptlrpc/layout.c index e11c9fe..bef1acb 100644 --- a/lustre/ptlrpc/layout.c +++ b/lustre/ptlrpc/layout.c @@ -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 = diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 749deb0..4a7c72a 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -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); } diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index b96d89f..262e503 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -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; diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index 20ec5f4..e049f47 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -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; -- 1.8.3.1