Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Tue, 29 Jan 2008 11:16:45 +0000 (11:16 +0000)
committerbobijam <bobijam>
Tue, 29 Jan 2008 11:16:45 +0000 (11:16 +0000)
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 2fb2eec..2b3533a 100644 (file)
@@ -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)
 {
 
 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)
 {
 }
 
 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)
 {
 }
 
 static __inline__ int ext2_test_bit(int nr, void *addr)
 {
-        return test_bit(nr, (long*)addr);
+        return test_bit(nr, addr);
 }
 
 /* modules */
 }
 
 /* modules */
index a703a7b..8c17bc5 100644 (file)
@@ -137,7 +137,7 @@ struct ll_recreate_obj {
 };
 
 struct obd_uuid {
 };
 
 struct obd_uuid {
-        __u8 uuid[40];
+        char uuid[40];
 };
 
 static inline int obd_uuid_equals(struct obd_uuid *u1, struct obd_uuid *u2)
 };
 
 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 {
 #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;
 };
 
         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;
         __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;
 };
 
         struct obd_uuid         obd_uuid;
 };
 
index 416dc60..5c59d5b 100644 (file)
@@ -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,
                             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);
 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);
                            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);
 int ldlm_cli_update_pool(struct ptlrpc_request *req);
 int ldlm_handle_convert0(struct ptlrpc_request *req,
                          const struct ldlm_request *dlm_req);
index f8f7742..88e1ef2 100644 (file)
@@ -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,
 }
 
 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;
 {
         struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
         struct ldlm_resource *res;
index ed32e21..32a8d69 100644 (file)
@@ -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;
 
         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);
 
         if (err)
                 GOTO(out, err);
 
index adcc5d7..852cea8 100644 (file)
@@ -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,
 }
 
 static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode,
-                                  int *flags)
+                                  __u32 *flags)
 {
         struct ldlm_resource *res;
         int rc;
 {
         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 */
  * 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;
 {
         struct ldlm_request *body;
         struct ldlm_reply *reply;
index 8635478..dcc0009 100755 (executable)
@@ -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
 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
 fi
 
 rm -rf $sysio_tmp
index 17ec86a..65a1378 100644 (file)
@@ -129,7 +129,7 @@ void liblustre_init_random()
         ll_srand(tv.tv_sec ^ __swab32(seed[0]), tv.tv_usec ^__swab32(getpid()));
 }
 
         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;
 {
 #ifdef HAVE_LIBCAP
         cap_t syscap;
index 73292c8..430d6ac 100644 (file)
@@ -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;
                 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));
                 struct lov_tgt_desc *tgt;
 
                 LASSERT(*vallen == sizeof(struct obd_id_info));
index 5a760bd..68686a1 100644 (file)
@@ -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) {
 
         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;
 
                 int off = pga[i]->off & ~CFS_PAGE_MASK;
                 int count = pga[i]->count > nob ? nob : pga[i]->count;
 
index 41352f1..affe7dd 100644 (file)
@@ -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;
                          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               count = 0;
         int               rc = -ENOENT;
         int               portals_compatibility;
         int               dist;
-        int               order;
+        __u32             order;
         lnet_nid_t        dst_nid;
         lnet_nid_t        src_nid;
 
         lnet_nid_t        dst_nid;
         lnet_nid_t        src_nid;
 
@@ -379,7 +379,6 @@ int ptlrpc_uuid_to_peer (struct obd_uuid *uuid,
                         break;
                 }
 
                         break;
                 }
 
-                LASSERT (order >= 0);
                 if (rc < 0 ||
                     dist < best_dist ||
                     (dist == best_dist && order < best_order)) {
                 if (rc < 0 ||
                     dist < best_dist ||
                     (dist == best_dist && order < best_order)) {
index 716f01e..146dd55 100644 (file)
@@ -550,7 +550,7 @@ int lustre_shrink_msg_v1(struct lustre_msg_v1 *msg, int segment,
         }
 
 out:
         }
 
 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,
 }
 
 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:
         }
 
 out:
-        return lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens);
+        return lustre_msg_size_v2(msg->lm_bufcount, (int *)msg->lm_buflens);
 }
 
 /*
 }
 
 /*