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 */
};
struct obd_uuid {
- __u8 uuid[40];
+ char uuid[40];
};
static inline int obd_uuid_equals(struct obd_uuid *u1, struct obd_uuid *u2)
#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;
};
__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;
};
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);
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 *,
}
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;
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);
}
static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode,
- int *flags)
+ __u32 *flags)
{
struct ldlm_resource *res;
int rc;
* 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;
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
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;
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));
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;
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;
break;
}
- LASSERT (order >= 0);
if (rc < 0 ||
dist < best_dist ||
(dist == best_dist && order < best_order)) {
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,
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);
}
/*