From b1cb51def2979b735d91b56ca8d0f861684d481c Mon Sep 17 00:00:00 2001 From: bobijam Date: Tue, 29 Jan 2008 11:16:45 +0000 Subject: [PATCH] Branch HEAD o=Bob Glossman(bogl@cray.com) i=adilger fix building errors for xt3 in SLES10. --- lustre/include/liblustre.h | 6 +++--- lustre/include/lustre/lustre_user.h | 6 +++--- lustre/include/lustre_dlm.h | 4 ++-- lustre/ldlm/ldlm_lock.c | 2 +- lustre/ldlm/ldlm_lockd.c | 2 +- lustre/ldlm/ldlm_request.c | 4 ++-- lustre/liblustre/genlib.sh | 2 +- lustre/liblustre/lutil.c | 2 +- lustre/lov/lov_obd.c | 2 +- lustre/osc/osc_request.c | 2 +- lustre/ptlrpc/events.c | 5 ++--- lustre/ptlrpc/pack_generic.c | 4 ++-- 12 files changed, 20 insertions(+), 21 deletions(-) diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index 2fb2eec..2b3533a 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -191,17 +191,17 @@ typedef int (write_proc_t)(struct file *file, const char *buffer, static __inline__ int ext2_set_bit(int nr, void *addr) { - return set_bit(nr, (long*)addr); + return set_bit(nr, addr); } static __inline__ int ext2_clear_bit(int nr, void *addr) { - return clear_bit(nr, (long*)addr); + return clear_bit(nr, addr); } static __inline__ int ext2_test_bit(int nr, void *addr) { - return test_bit(nr, (long*)addr); + return test_bit(nr, addr); } /* modules */ diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h index a703a7b..8c17bc5 100644 --- a/lustre/include/lustre/lustre_user.h +++ b/lustre/include/lustre/lustre_user.h @@ -137,7 +137,7 @@ struct ll_recreate_obj { }; struct obd_uuid { - __u8 uuid[40]; + char uuid[40]; }; static inline int obd_uuid_equals(struct obd_uuid *u1, struct obd_uuid *u2) @@ -182,7 +182,7 @@ static inline char *obd_uuid2str(struct obd_uuid *uuid) #define QFMT_LDISKFS 2 /* QFMT_VFS_V0(2), quota format for ldiskfs */ struct if_quotacheck { - __u8 obd_type[16]; + char obd_type[16]; struct obd_uuid obd_uuid; }; @@ -276,7 +276,7 @@ struct if_quotactl { __u32 qc_stat; struct obd_dqinfo qc_dqinfo; struct obd_dqblk qc_dqblk; - __u8 obd_type[16]; + char obd_type[16]; struct obd_uuid obd_uuid; }; diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h index 416dc60..5c59d5b 100644 --- a/lustre/include/lustre_dlm.h +++ b/lustre/include/lustre_dlm.h @@ -664,7 +664,7 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags, ldlm_policy_data_t *, ldlm_mode_t mode, struct lustre_handle *); struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode, - int *flags); + __u32 *flags); void ldlm_lock_cancel(struct ldlm_lock *lock); void ldlm_cancel_locks_for_export(struct obd_export *export); void ldlm_reprocess_all(struct ldlm_resource *res); @@ -752,7 +752,7 @@ int ldlm_cli_enqueue_local(struct ldlm_namespace *ns, struct lustre_handle *lockh); int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new, void *data, __u32 data_len); -int ldlm_cli_convert(struct lustre_handle *, int new_mode, int *flags); +int ldlm_cli_convert(struct lustre_handle *, int new_mode, __u32 *flags); int ldlm_cli_update_pool(struct ptlrpc_request *req); int ldlm_handle_convert0(struct ptlrpc_request *req, const struct ldlm_request *dlm_req); diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index f8f7742..88e1ef2 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -1630,7 +1630,7 @@ void ldlm_cancel_locks_for_export(struct obd_export *exp) } struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode, - int *flags) + __u32 *flags) { struct list_head rpc_list = LIST_HEAD_INIT(rpc_list); struct ldlm_resource *res; diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index ed32e21..32a8d69 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -975,7 +975,7 @@ existing_lock: if (dlm_req->lock_desc.l_resource.lr_type == LDLM_EXTENT) lock->l_req_extent = lock->l_policy_data.l_extent; - err = ldlm_lock_enqueue(ns, &lock, cookie, &flags); + err = ldlm_lock_enqueue(ns, &lock, cookie, (int *)&flags); if (err) GOTO(out, err); diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index adcc5d7..852cea8 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -716,7 +716,7 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, } static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode, - int *flags) + __u32 *flags) { struct ldlm_resource *res; int rc; @@ -743,7 +743,7 @@ static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode, * conversion of locks which are on the waiting or converting queue */ /* Caller of this code is supposed to take care of lock readers/writers accounting */ -int ldlm_cli_convert(struct lustre_handle *lockh, int new_mode, int *flags) +int ldlm_cli_convert(struct lustre_handle *lockh, int new_mode, __u32 *flags) { struct ldlm_request *body; struct ldlm_reply *reply; diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh index 8635478..dcc0009 100755 --- a/lustre/liblustre/genlib.sh +++ b/lustre/liblustre/genlib.sh @@ -108,7 +108,7 @@ OS=`uname` if test x$OS = xAIX; then $LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so else -$LD -shared -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS +$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS fi rm -rf $sysio_tmp diff --git a/lustre/liblustre/lutil.c b/lustre/liblustre/lutil.c index 17ec86a..65a1378 100644 --- a/lustre/liblustre/lutil.c +++ b/lustre/liblustre/lutil.c @@ -129,7 +129,7 @@ void liblustre_init_random() ll_srand(tv.tv_sec ^ __swab32(seed[0]), tv.tv_usec ^__swab32(getpid())); } -static void init_capability(int *res) +static void init_capability(__u32 *res) { #ifdef HAVE_LIBCAP cap_t syscap; diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 73292c8..430d6ac 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -2378,7 +2378,7 @@ static int lov_get_info(struct obd_export *exp, __u32 keylen, GOTO(out, rc = -ENXIO); } else if (KEY_IS(KEY_LAST_ID)) { struct obd_id_info *info = val; - int size = sizeof(obd_id); + __u32 size = sizeof(obd_id); struct lov_tgt_desc *tgt; LASSERT(*vallen == sizeof(struct obd_id_info)); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 5a760bd..68686a1 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -940,7 +940,7 @@ static obd_count osc_checksum_bulk(int nob, obd_count pg_count, LASSERT (pg_count > 0); while (nob > 0 && pg_count > 0) { - char *ptr = cfs_kmap(pga[i]->pg); + unsigned char *ptr = cfs_kmap(pga[i]->pg); int off = pga[i]->off & ~CFS_PAGE_MASK; int count = pga[i]->count > nob ? nob : pga[i]->count; diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index 41352f1..affe7dd 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -354,12 +354,12 @@ int ptlrpc_uuid_to_peer (struct obd_uuid *uuid, lnet_process_id_t *peer, lnet_nid_t *self) { int best_dist = 0; - int best_order = 0; + __u32 best_order = 0; int count = 0; int rc = -ENOENT; int portals_compatibility; int dist; - int order; + __u32 order; lnet_nid_t dst_nid; lnet_nid_t src_nid; @@ -379,7 +379,6 @@ int ptlrpc_uuid_to_peer (struct obd_uuid *uuid, break; } - LASSERT (order >= 0); if (rc < 0 || dist < best_dist || (dist == best_dist && order < best_order)) { diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 716f01e..146dd55 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -550,7 +550,7 @@ int lustre_shrink_msg_v1(struct lustre_msg_v1 *msg, int segment, } out: - return lustre_msg_size_v1(msg->lm_bufcount, msg->lm_buflens); + return lustre_msg_size_v1(msg->lm_bufcount, (int *)msg->lm_buflens); } int lustre_shrink_msg_v2(struct lustre_msg_v2 *msg, int segment, @@ -588,7 +588,7 @@ int lustre_shrink_msg_v2(struct lustre_msg_v2 *msg, int segment, } out: - return lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens); + return lustre_msg_size_v2(msg->lm_bufcount, (int *)msg->lm_buflens); } /* -- 1.8.3.1