Whamcloud - gitweb
Branch b1_6
authorbobijam <bobijam>
Tue, 29 Jan 2008 10:35:58 +0000 (10:35 +0000)
committerbobijam <bobijam>
Tue, 29 Jan 2008 10:35:58 +0000 (10:35 +0000)
b=14139
o=Bob Glossman(bogl@cray.com)
i=adilger

fix building errors for xt3 in SLES10.

12 files changed:
lustre/include/liblustre.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/liblustre/genlib.sh
lustre/liblustre/lutil.c
lustre/lov/lov_obd.c
lustre/osc/osc_request.c
lustre/ptlrpc/events.c
lustre/ptlrpc/pack_generic.c

index c368a7b..2eb3b8d 100644 (file)
@@ -194,17 +194,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 */
index 57e7c64..354127c 100644 (file)
@@ -130,7 +130,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)
@@ -178,7 +178,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;
 };
 
@@ -255,7 +255,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;
 };
 
index 78b4a13..1a05714 100644 (file)
@@ -682,7 +682,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);
@@ -760,7 +760,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_cli_cancel(struct lustre_handle *lockh);
 int ldlm_cli_cancel_unused(struct ldlm_namespace *, struct ldlm_res_id *,
index f5749ba..629c814 100644 (file)
@@ -1621,7 +1621,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;
index 924fd4b..2deeef7 100644 (file)
@@ -974,7 +974,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(obddev->obd_namespace, &lock, cookie, &flags);
+        err = ldlm_lock_enqueue(obddev->obd_namespace, &lock, cookie, (int *)&flags);
         if (err)
                 GOTO(out, err);
 
index fa1d4c9..fd7b959 100644 (file)
@@ -740,7 +740,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;
@@ -767,7 +767,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;
index eb6112e..4f11a99 100755 (executable)
@@ -105,7 +105,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
index 250c70e..99f1cfe 100644 (file)
@@ -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;
index 6ac98ce..50a9723 100644 (file)
@@ -2498,7 +2498,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));
index 823eaca..0bba7eb 100644 (file)
@@ -919,7 +919,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;
 
index dcc2c3c..c1fc0db 100644 (file)
@@ -395,12 +395,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;
 
@@ -420,7 +420,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)) {
index 5b3808f..66fba6e 100644 (file)
@@ -594,7 +594,7 @@ void lustre_shrink_reply_v1(struct ptlrpc_request *req, int segment,
                 msg->lm_buflens[msg->lm_bufcount - 1] = 0;
         }
 
-        req->rq_replen = lustre_msg_size_v1(msg->lm_bufcount, msg->lm_buflens);
+        req->rq_replen = lustre_msg_size_v1(msg->lm_bufcount, (int *)msg->lm_buflens);
 }
 
 void lustre_shrink_reply_v2(struct ptlrpc_request *req, int segment,
@@ -633,7 +633,7 @@ void lustre_shrink_reply_v2(struct ptlrpc_request *req, int segment,
                 msg->lm_buflens[msg->lm_bufcount - 1] = 0;
         }
 
-        req->rq_replen = lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens);
+        req->rq_replen = lustre_msg_size_v2(msg->lm_bufcount, (int *)msg->lm_buflens);
 }
 
 /*