Getting rid of (some of) lustre typedefs
cover Getting rid of (some of) lustre typedefs
This is beginning of removal of Lustre typedefs that don't make sense and only obscure things for innocent viewers.
The typedefs are replaced with uXX and sXX which is what I think what is desired, except the definitions in lustre_idl.h that uses __uXX and __sXX (necessary because some of our userspace tools include it), hopefully that's still ok, though?
More of this sort of patches will follow after we make sure of the correctness of the end result.
Oleg Drokin (2):
staging/lustre: get rid of seqno_t and mdsno_t typedefs staging/lustre: get rid of obd_* typedefs
drivers/staging/lustre/lustre/fid/fid_request.c | 6 +- drivers/staging/lustre/lustre/fld/fld_cache.c | 16 +-- drivers/staging/lustre/lustre/fld/fld_internal.h | 2 +- drivers/staging/lustre/lustre/fld/fld_request.c | 9 +- drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/include/lclient.h | 2 +- .../lustre/lustre/include/linux/obd_class.h | 6 +- drivers/staging/lustre/lustre/include/lu_object.h | 6 +- .../lustre/lustre/include/lustre/lustre_idl.h | 124 +++++++++------------ drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fld.h | 5 +- drivers/staging/lustre/lustre/include/lustre_lib.h | 8 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- drivers/staging/lustre/lustre/include/md_object.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 50 ++++----- drivers/staging/lustre/lustre/include/obd_cksum.h | 6 +- drivers/staging/lustre/lustre/include/obd_class.h | 24 ++-- drivers/staging/lustre/lustre/include/obd_ost.h | 2 +- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 7 +- .../staging/lustre/lustre/llite/llite_internal.h | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 2 +- drivers/staging/lustre/lustre/llite/lloop.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 10 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 16 ++- .../staging/lustre/lustre/lov/lov_cl_internal.h | 4 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 8 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 28 ++--- drivers/staging/lustre/lustre/lov/lov_io.c | 8 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 24 ++-- drivers/staging/lustre/lustre/lov/lov_merge.c | 14 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 44 ++++---- drivers/staging/lustre/lustre/lov/lov_offset.c | 29 +++-- drivers/staging/lustre/lustre/lov/lov_pack.c | 4 +- drivers/staging/lustre/lustre/lov/lov_page.c | 2 +- drivers/staging/lustre/lustre/lov/lov_request.c | 18 +-- drivers/staging/lustre/lustre/lov/lovsub_dev.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 14 +-- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 2 +- .../lustre/lustre/obdclass/linux/linux-obdo.c | 8 +- .../staging/lustre/lustre/obdclass/local_storage.c | 2 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 12 +- drivers/staging/lustre/lustre/obdecho/echo.c | 21 ++-- .../staging/lustre/lustre/obdecho/echo_client.c | 58 +++++----- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_quota.c | 8 +- drivers/staging/lustre/lustre/osc/osc_request.c | 46 ++++---- drivers/staging/lustre/lustre/ptlrpc/layout.c | 4 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +- 58 files changed, 344 insertions(+), 369 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/2 staging/lustre: get rid of seqno_t and mdsno_t typedefs
seqno_t is u64 and mdsno_t is u32 so just use them as such.
--- drivers/staging/lustre/lustre/fid/fid_request.c | 6 +++--- drivers/staging/lustre/lustre/fld/fld_cache.c | 16 ++++++++-------- drivers/staging/lustre/lustre/fld/fld_internal.h | 2 +- drivers/staging/lustre/lustre/fld/fld_request.c | 9 ++++----- .../staging/lustre/lustre/include/lustre/lustre_idl.h | 2 -- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fld.h | 5 ++--- drivers/staging/lustre/lustre/include/md_object.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 10 ++++------ drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +++----- 12 files changed, 29 insertions(+), 37 deletions(-)
drivers/staging/lustre/lustre/fid/fid_request.c +3 -3
@@ -187,7 +187,7 @@ static int seq_client_alloc_meta(const struct lu_env *env,/* Allocate new sequence for client. */ static int seq_client_alloc_seq (const struct lu_env *env, -struct lu_client_seq *seq,seqno_t *seqnr) +struct lu_client_seq *seq,u64 *seqnr) {int rc;
@@ -249,7 +249,7 @@ static void seq_fid_alloc_fini(struct lu_client_seq *seq)* Allocate the whole seq to the caller. **/ int seq_client_get_seq (const struct lu_env *env, -struct lu_client_seq *seq,seqno_t *seqnr) +struct lu_client_seq *seq,u64 *seqnr) {wait_queue_t link;int rc;
@@ -313,7 +313,7 @@ int seq_client_alloc_fid(const struct lu_env *env, seq->lcs_fid.f_oid = seq->lcs_width;while (1 ) { -seqno_t seqnr; +u64 seqnr;if (!fid_is_zero (&seq->lcs_fid) &&fid_oid (&seq->lcs_fid) < seq->lcs_width) {
drivers/staging/lustre/lustre/fld/fld_cache.c +8 -8
@@ -263,8 +263,8 @@ void fld_cache_punch_hole(struct fld_cache *cache, struct fld_cache_entry *f_new) {const struct lu_seq_range *range = &f_new->fce_range; -const seqno_t new_start = range->lsr_start; -const seqno_t new_end = range->lsr_end; +const u64 new_start = range->lsr_start; +const u64 new_end = range->lsr_end;struct fld_cache_entry *fldt;OBD_ALLOC_GFP (fldt,sizeof (*fldt),GFP_ATOMIC );
@@ -302,9 +302,9 @@ static void fld_cache_overlap_handle(struct fld_cache *cache, struct fld_cache_entry *f_new) {const struct lu_seq_range *range = &f_new->fce_range; -const seqno_t new_start = range->lsr_start; -const seqno_t new_end = range->lsr_end; -const mdsno_t mdt = range->lsr_index; +const u64 new_start = range->lsr_start; +const u64 new_end = range->lsr_end; +const u32 mdt = range->lsr_index;/* this is overlap case, these case are checking overlapping with * prev range only. fixup will handle overlapping with next range. */
@@ -386,8 +386,8 @@ int fld_cache_insert_nolock(struct fld_cache *cache,struct fld_cache_entry *n;struct list_head *head;struct list_head *prev =NULL ; -const seqno_t new_start = f_new->fce_range.lsr_start; -const seqno_t new_end = f_new->fce_range.lsr_end; +const u64 new_start = f_new->fce_range.lsr_start; +const u64 new_end = f_new->fce_range.lsr_end;__u32 new_flags = f_new->fce_range.lsr_flags;/*
@@ -516,7 +516,7 @@ struct fld_cache_entry* lookup \a seq sequence for range in fld cache. */ int fld_cache_lookup (struct fld_cache *cache, -const seqno_t seq,struct lu_seq_range *range) +const u64 seq,struct lu_seq_range *range) {struct fld_cache_entry *flde;struct fld_cache_entry *prev =NULL ;
drivers/staging/lustre/lustre/fld/fld_internal.h +1 -1
@@ -167,7 +167,7 @@ void fld_cache_delete(struct fld_cache *cache,void fld_cache_delete_nolock (struct fld_cache *cache,const struct lu_seq_range *range);int fld_cache_lookup (struct fld_cache *cache, -const seqno_t seq,struct lu_seq_range *range); +const u64 seq,struct lu_seq_range *range);struct fld_cache_entry *fld_cache_entry_lookup (struct fld_cache *cache,struct lu_seq_range *range);
drivers/staging/lustre/lustre/fld/fld_request.c +4 -5
@@ -110,15 +110,14 @@ static void fld_exit_request(struct client_obd *cli)client_obd_list_unlock (&cli->cl_loi_list_lock); } -static int fld_rrb_hash (struct lu_client_fld *fld, -seqno_t seq) +static int fld_rrb_hash (struct lu_client_fld *fld,u64 seq) {LASSERT (fld->lcf_count >0 );return do_div (seq, fld->lcf_count); }static struct lu_fld_target * -fld_rrb_scan (struct lu_client_fld *fld,seqno_t seq) +fld_rrb_scan (struct lu_client_fld *fld,u64 seq) {struct lu_fld_target *target;int hash;
@@ -173,7 +172,7 @@ struct lu_fld_hash fld_hash[] = { };static struct lu_fld_target * -fld_client_get_target (struct lu_client_fld *fld,seqno_t seq) +fld_client_get_target (struct lu_client_fld *fld,u64 seq) {struct lu_fld_target *target;
@@ -453,7 +452,7 @@ out_req:return rc; } -int fld_client_lookup (struct lu_client_fld *fld,seqno_t seq,mdsno_t *mds, +int fld_client_lookup (struct lu_client_fld *fld,u64 seq,u32 *mds,__u32 flags,const struct lu_env *env) {struct lu_seq_range res = {0 };
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +0 -2
@@ -165,8 +165,6 @@#define LUSTRE_LOG_VERSION 0x00050000#define LUSTRE_MGS_VERSION 0x00060000 -typedef __u32 mdsno_t ; -typedef __u64 seqno_t ;typedef __u64 obd_id ;typedef __u64 obd_seq ;typedef __s64 obd_time ;
drivers/staging/lustre/lustre/include/lustre_fid.h +1 -1
@@ -469,7 +469,7 @@ void seq_client_flush(struct lu_client_seq *seq);int seq_client_alloc_fid (const struct lu_env *env,struct lu_client_seq *seq,struct lu_fid *fid);int seq_client_get_seq (const struct lu_env *env,struct lu_client_seq *seq, -seqno_t *seqnr); +u64 *seqnr);int seq_site_fini (const struct lu_env *env,struct seq_server_site *ss);/* Fids common stuff */ int fid_is_local(const struct lu_env *env,
drivers/staging/lustre/lustre/include/lustre_fld.h +2 -3
@@ -137,15 +137,14 @@ void fld_client_fini(struct lu_client_fld *fld);void fld_client_flush (struct lu_client_fld *fld); -int fld_client_lookup (struct lu_client_fld *fld,seqno_t seq,mdsno_t *mds, +int fld_client_lookup (struct lu_client_fld *fld,u64 seq,u32 *mds,__u32 flags,const struct lu_env *env);int fld_client_create (struct lu_client_fld *fld,struct lu_seq_range *range,const struct lu_env *env); -int fld_client_delete (struct lu_client_fld *fld, -seqno_t seq, +int fld_client_delete (struct lu_client_fld *fld,u64 seq,const struct lu_env *env); int fld_client_add_target(struct lu_client_fld *fld,
drivers/staging/lustre/lustre/include/md_object.h +1 -1
@@ -451,7 +451,7 @@ struct seq_server_site {/** * mds number of this site. */ -mdsno_t ss_node_id; +u32 ss_node_id;/** * Fid location database */
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -1057,7 +1057,7 @@ struct md_op_data {struct lu_fid op_fid2;/* operation fid2 (usually child) */ struct lu_fid op_fid3;/* 2 extra fids to find conflicting */ struct lu_fid op_fid4;/* to the operation locks. */ -mdsno_t op_mds;/* what mds server open will go to */ +u32 op_mds;/* what mds server open will go to */ struct lustre_handle op_handle;obd_time op_mod_time;const char *op_name;
drivers/staging/lustre/lustre/lmv/lmv_fld.c +1 -1
@@ -53,7 +53,7 @@int lmv_fld_lookup (struct lmv_obd *lmv,const struct lu_fid *fid, -mdsno_t *mds) +u32 *mds) {int rc;
drivers/staging/lustre/lustre/lmv/lmv_internal.h +4 -6
@@ -70,10 +70,8 @@ int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,int lmv_blocking_ast (struct ldlm_lock *,struct ldlm_lock_desc *,void *,int ); -int lmv_fld_lookup (struct lmv_obd *lmv,const struct lu_fid *fid, -mdsno_t *mds); -int __lmv_fid_alloc (struct lmv_obd *lmv,struct lu_fid *fid, -mdsno_t mds); +int lmv_fld_lookup (struct lmv_obd *lmv,const struct lu_fid *fid,u32 *mds); +int __lmv_fid_alloc (struct lmv_obd *lmv,struct lu_fid *fid,u32 mds);int lmv_fid_alloc (struct obd_export *exp,struct lu_fid *fid,struct md_op_data *op_data);
@@ -111,7 +109,7 @@ static inline int lmv_get_easize(struct lmv_obd *lmv) }static inline struct lmv_tgt_desc * -lmv_get_target (struct lmv_obd *lmv,mdsno_t mds) +lmv_get_target (struct lmv_obd *lmv,u32 mds) {int count = lmv->desc.ld_tgt_count;int i;
@@ -130,7 +128,7 @@ lmv_get_target(struct lmv_obd *lmv, mdsno_t mds)static inline struct lmv_tgt_desc *lmv_find_target (struct lmv_obd *lmv,const struct lu_fid *fid) { -mdsno_t mds =0 ; +u32 mds =0 ;int rc;if (lmv->desc.ld_tgt_count >1 ) {
drivers/staging/lustre/lustre/lmv/lmv_obd.c +3 -5
@@ -1201,8 +1201,7 @@ static int lmv_choose_mds(struct lmv_obd *lmv, struct md_op_data *op_data,* This is _inode_ placement policy function (not name). */ static int lmv_placement_policy (struct obd_device *obd, -struct md_op_data *op_data, -mdsno_t *mds) +struct md_op_data *op_data,u32 *mds) {struct lmv_obd *lmv = &obd->u.lmv;
@@ -1241,8 +1240,7 @@ static int lmv_placement_policy(struct obd_device *obd,return 0 ; } -int __lmv_fid_alloc (struct lmv_obd *lmv,struct lu_fid *fid, -mdsno_t mds) +int __lmv_fid_alloc (struct lmv_obd *lmv,struct lu_fid *fid,u32 mds) {struct lmv_tgt_desc *tgt;int rc;
@@ -1279,7 +1277,7 @@ int lmv_fid_alloc(struct obd_export *exp, struct lu_fid *fid, {struct obd_device *obd =class_exp2obd (exp);struct lmv_obd *lmv = &obd->u.lmv; -mdsno_t mds =0 ; +u32 mds =0 ;int rc;LASSERT (op_data !=NULL );
Signature · 1 line
1.9.3
PATCH 2/2 staging/lustre: get rid of obd_* typedefs
In reply to Oleg DrokinWe 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 where
they are replaced with __uXX and __sXX to be able to be included in userspace
--- drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/include/lclient.h | 2 +- .../lustre/lustre/include/linux/obd_class.h | 6 +- drivers/staging/lustre/lustre/include/lu_object.h | 6 +- .../lustre/lustre/include/lustre/lustre_idl.h | 122 +++++++++------------ drivers/staging/lustre/lustre/include/lustre_lib.h | 8 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 48 ++++---- drivers/staging/lustre/lustre/include/obd_cksum.h | 6 +- drivers/staging/lustre/lustre/include/obd_class.h | 24 ++-- drivers/staging/lustre/lustre/include/obd_ost.h | 2 +- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 7 +- .../staging/lustre/lustre/llite/llite_internal.h | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 2 +- drivers/staging/lustre/lustre/llite/lloop.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +- .../staging/lustre/lustre/lov/lov_cl_internal.h | 4 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 8 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 28 ++--- drivers/staging/lustre/lustre/lov/lov_io.c | 8 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 24 ++-- drivers/staging/lustre/lustre/lov/lov_merge.c | 14 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 44 ++++---- drivers/staging/lustre/lustre/lov/lov_offset.c | 29 +++-- drivers/staging/lustre/lustre/lov/lov_pack.c | 4 +- drivers/staging/lustre/lustre/lov/lov_page.c | 2 +- drivers/staging/lustre/lustre/lov/lov_request.c | 18 +-- drivers/staging/lustre/lustre/lov/lovsub_dev.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 14 +-- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 2 +- .../lustre/lustre/obdclass/linux/linux-obdo.c | 8 +- .../staging/lustre/lustre/obdclass/local_storage.c | 2 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 12 +- drivers/staging/lustre/lustre/obdecho/echo.c | 21 ++-- .../staging/lustre/lustre/obdecho/echo_client.c | 58 +++++----- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_quota.c | 8 +- drivers/staging/lustre/lustre/osc/osc_request.c | 46 ++++---- drivers/staging/lustre/lustre/ptlrpc/layout.c | 4 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +- 49 files changed, 315 insertions(+), 332 deletions(-)
drivers/staging/lustre/lustre/include/cl_object.h +2 -2
@@ -2508,7 +2508,7 @@ struct cl_req_operations {void (*cro_attr_set)(const struct lu_env *env,const struct cl_req_slice *slice,const struct cl_object *obj, -struct cl_req_attr *attr,obd_valid flags); +struct cl_req_attr *attr,u64 flags);/** * Called top-to-bottom from cl_req_completion() to notify layers that * transfer completed. Has to free all state allocated by
@@ -3182,7 +3182,7 @@ void cl_req_page_add (const struct lu_env *env, struct cl_req *req,void cl_req_page_done (const struct lu_env *env,struct cl_page *page);int cl_req_prep (const struct lu_env *env,struct cl_req *req);void cl_req_attr_set (const struct lu_env *env,struct cl_req *req, -struct cl_req_attr *attr,obd_valid flags); +struct cl_req_attr *attr,u64 flags);void cl_req_completion (const struct lu_env *env,struct cl_req *req,int ioret);/** \defgroup cl_sync_io cl_sync_io
drivers/staging/lustre/lustre/include/lclient.h +1 -1
@@ -350,7 +350,7 @@ void ccc_req_completion(const struct lu_env *env, const struct cl_req_slice *slice, int ioret);void ccc_req_attr_set (const struct lu_env *env,const struct cl_req_slice *slice,const struct cl_object *obj, -struct cl_req_attr *oa,obd_valid flags); +struct cl_req_attr *oa,u64 flags);struct lu_device *ccc2lu_dev (struct ccc_device *vdv);struct lu_object *ccc2lu (struct ccc_object *vob);
drivers/staging/lustre/lustre/include/linux/obd_class.h +3 -3
@@ -49,9 +49,9 @@/* obdo.c */ void obdo_from_la (struct obdo *dst,struct lu_attr *la,__u64 valid); -void la_from_obdo (struct lu_attr *la,struct obdo *dst,obd_flag valid); -void obdo_refresh_inode (struct inode *dst,struct obdo *src,obd_flag valid); -void obdo_to_inode (struct inode *dst,struct obdo *src,obd_flag valid); +void la_from_obdo (struct lu_attr *la,struct obdo *dst,u32 valid); +void obdo_refresh_inode (struct inode *dst,struct obdo *src,u32 valid); +void obdo_to_inode (struct inode *dst,struct obdo *src,u32 valid);#define ll_inode_flags (inode) (inode->i_flags)
drivers/staging/lustre/lustre/include/lu_object.h +3 -3
@@ -404,11 +404,11 @@ struct lu_attr {/** size in bytes */ __u64 la_size;/** modification time in seconds since Epoch */ -obd_time la_mtime; +s64 la_mtime;/** access time in seconds since Epoch */ -obd_time la_atime; +s64 la_atime;/** change time in seconds since Epoch */ -obd_time la_ctime; +s64 la_ctime;/** 512-byte blocks allocated to object */ __u64 la_blocks;/** permission bits and file type */
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +54 -68
279 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre_lib.h +4 -4
@@ -65,8 +65,8 @@ struct l_wait_info;int target_pack_pool_reply (struct ptlrpc_request *req);int do_set_info_async (struct obd_import *imp,int opcode,int version, -obd_count keylen,void *key, -obd_count vallen,void *val, +u32 keylen,void *key, +u32 vallen,void *val,struct ptlrpc_request_set *set);#define OBD_RECOVERY_MAX_TIME (obd_timeout * 18)/* b13079 */
@@ -133,8 +133,8 @@ struct obd_ioctl_data {struct obdo ioc_obdo1;struct obdo ioc_obdo2; -obd_size ioc_count; -obd_off ioc_offset; +u64 ioc_count; +u64 ioc_offset;__u32 ioc_dev;__u32 ioc_command;
drivers/staging/lustre/lustre/include/lustre_lite.h +1 -1
@@ -60,7 +60,7 @@struct lustre_rw_params {int lrp_lock_mode;ldlm_policy_data_t lrp_policy; -obd_flag lrp_brw_flags; +u32 lrp_brw_flags;int lrp_ast_flags; };
drivers/staging/lustre/lustre/include/obd.h +23 -25
132 lines not on this page · raw message
drivers/staging/lustre/lustre/include/obd_cksum.h +3 -3
@@ -64,10 +64,10 @@ static inline unsigned char cksum_obd2cfs(cksum_type_t cksum_type)* because that is supported by all clients since 1.8 * * In case multiple algorithms are supported the best one is used. */ -static inline obd_flag cksum_type_pack (cksum_type_t cksum_type) +static inline u32 cksum_type_pack (cksum_type_t cksum_type) {unsigned int performance =0 , tmp; -obd_flag flag =OBD_FL_CKSUM_ADLER ; +u32 flag =OBD_FL_CKSUM_ADLER ;if (cksum_type &OBD_CKSUM_CRC32 ) { tmp =cfs_crypto_hash_speed (cksum_obd2cfs (OBD_CKSUM_CRC32 ));
@@ -98,7 +98,7 @@ static inline obd_flag cksum_type_pack(cksum_type_t cksum_type)return flag; } -static inline cksum_type_t cksum_type_unpack (obd_flag o_flags) +static inline cksum_type_t cksum_type_unpack (u32 o_flags) {switch (o_flags &OBD_FL_CKSUM_ALL ) {case OBD_FL_CKSUM_CRC32C :
drivers/staging/lustre/lustre/include/obd_class.h +12 -12
@@ -308,12 +308,12 @@ static inline enum obd_option exp_flags_from_obd(struct obd_device *obd) } -void obdo_cpy_md (struct obdo *dst,struct obdo *src,obd_flag valid); +void obdo_cpy_md (struct obdo *dst,struct obdo *src,u32 valid);void obdo_to_ioobj (struct obdo *oa,struct obd_ioobj *ioobj);void obdo_from_iattr (struct obdo *oa,struct iattr *attr,unsigned int ia_valid); -void iattr_from_obdo (struct iattr *attr,struct obdo *oa,obd_flag valid); -void md_from_obdo (struct md_op_data *op_data,struct obdo *oa,obd_flag valid); +void iattr_from_obdo (struct iattr *attr,struct obdo *oa,u32 valid); +void md_from_obdo (struct md_op_data *op_data,struct obdo *oa,u32 valid);void obdo_from_md (struct obdo *oa,struct md_op_data *op_data,unsigned int valid);
@@ -510,8 +510,8 @@ static inline int obd_get_info(const struct lu_env *env, }static inline int obd_set_info_async (const struct lu_env *env, -struct obd_export *exp,obd_count keylen, -void *key,obd_count vallen,void *val, +struct obd_export *exp,u32 keylen, +void *key,u32 vallen,void *val,struct ptlrpc_request_set *set) {int rc;
@@ -1123,7 +1123,7 @@ static inline int obd_destroy_export(struct obd_export *exp)static inline int obd_extent_calc (struct obd_export *exp,struct lov_stripe_md *md, -int cmd,obd_off *offset) +int cmd,u64 *offset) {int rc;
@@ -1239,7 +1239,7 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, }static inline int obd_sync_rqset (struct obd_export *exp,struct obd_info *oinfo, -obd_size start,obd_size end) +u64 start,u64 end) {struct ptlrpc_request_set *set =NULL ;int rc;
@@ -1259,7 +1259,7 @@ static inline int obd_sync_rqset(struct obd_export *exp, struct obd_info *oinfo, }static inline int obd_sync (const struct lu_env *env,struct obd_export *exp, -struct obd_info *oinfo,obd_size start,obd_size end, +struct obd_info *oinfo,u64 start,u64 end,struct ptlrpc_request_set *set) {int rc;
@@ -1306,7 +1306,7 @@ static inline int obd_punch(const struct lu_env *env, struct obd_export *exp, }static inline int obd_brw (int cmd,struct obd_export *exp, -struct obd_info *oinfo,obd_count oa_bufs, +struct obd_info *oinfo,u32 oa_bufs,struct brw_page *pg,struct obd_trans_info *oti) {int rc;
@@ -1371,7 +1371,7 @@ static inline int obd_merge_lvb(struct obd_export *exp, }static inline int obd_adjust_kms (struct obd_export *exp, -struct lov_stripe_md *lsm,obd_off size, +struct lov_stripe_md *lsm,u64 size,int shrink) {int rc;
@@ -1962,7 +1962,7 @@ static inline int md_free_lustre_md(struct obd_export *exp,static inline int md_setxattr (struct obd_export *exp,const struct lu_fid *fid,struct obd_capa *oc, -obd_valid valid,const char *name, +u64 valid,const char *name,const char *input,int input_size,int output_size,int flags,__u32 suppgid,struct ptlrpc_request **request)
@@ -1976,7 +1976,7 @@ static inline int md_setxattr(struct obd_export *exp,static inline int md_getxattr (struct obd_export *exp,const struct lu_fid *fid,struct obd_capa *oc, -obd_valid valid,const char *name, +u64 valid,const char *name,const char *input,int input_size,int output_size,int flags,struct ptlrpc_request **request)
drivers/staging/lustre/lustre/include/obd_ost.h +1 -1
@@ -49,7 +49,7 @@ struct osc_brw_async_args {struct obdo *aa_oa;int aa_requested_nob;int aa_nio_count; -obd_count aa_page_count; +u32 aa_page_count;int aa_resends;struct brw_page **aa_ppga;struct client_obd *aa_cli;
drivers/staging/lustre/lustre/lclient/lcommon_cl.c +2 -2
@@ -895,11 +895,11 @@ void ccc_req_completion(const struct lu_env *env,void ccc_req_attr_set (const struct lu_env *env,const struct cl_req_slice *slice,const struct cl_object *obj, -struct cl_req_attr *attr,obd_valid flags) +struct cl_req_attr *attr,u64 flags) {struct inode *inode;struct obdo *oa; -obd_flag valid_flags; +u32 valid_flags; oa = attr->cra_oa; inode =ccc_object_inode (obj);
drivers/staging/lustre/lustre/llite/file.c +3 -4
@@ -1248,8 +1248,7 @@ static ssize_t ll_file_splice_read(struct file *in_file, loff_t *ppos,return result; } -static int ll_lov_recreate (struct inode *inode,struct ost_id *oi, -obd_count ost_idx) +static int ll_lov_recreate (struct inode *inode,struct ost_id *oi,u32 ost_idx) {struct obd_export *exp =ll_i2dtexp (inode);struct obd_trans_info oti = {0 };
@@ -1314,7 +1313,7 @@ static int ll_lov_recreate_fid(struct inode *inode, unsigned long arg) {struct lu_fid fid;struct ost_id oi; -obd_count ost_idx; +u32 ost_idx;if (!capable (CFS_CAP_SYS_ADMIN ))return -EPERM ;
@@ -2893,7 +2892,7 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)ll_lookup_finish_locks (&oit, dentry); }else if (!ll_have_md_lock (dentry->d_inode, &ibits,LCK_MINMODE )) {struct ll_sb_info *sbi =ll_i2sbi (dentry->d_inode); -obd_valid valid =OBD_MD_FLGETATTR ; +u64 valid =OBD_MD_FLGETATTR ;struct md_op_data *op_data;int ealen =0 ;
drivers/staging/lustre/lustre/llite/llite_internal.h +2 -2
@@ -1128,7 +1128,7 @@ struct eacl_entry {ext_acl_xattr_header *ee_acl; }; -obd_valid rce_ops2valid (int ops); +u64 rce_ops2valid (int ops);struct rmtacl_ctl_entry *rct_search (struct rmtacl_ctl_table *rct,pid_t key);int rct_add (struct rmtacl_ctl_table *rct,pid_t key,int ops);int rct_del (struct rmtacl_ctl_table *rct,pid_t key);
@@ -1144,7 +1144,7 @@ void et_search_free(struct eacl_table *et, pid_t key);void et_init (struct eacl_table *et);void et_fini (struct eacl_table *et);#else -static inline obd_valid rce_ops2valid (int ops) +static inline u64 rce_ops2valid (int ops) {return 0 ; }
drivers/staging/lustre/lustre/llite/llite_lib.c +1 -1
@@ -162,7 +162,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,struct obd_uuid *uuid;struct md_op_data *op_data;struct lustre_md lmd; -obd_valid valid; +u64 valid;int size, err, checksum; obd =class_name2obd (md);
drivers/staging/lustre/lustre/llite/llite_rmtacl.c +1 -1
@@ -58,7 +58,7 @@ static inline __u32 ee_hashfunc(uid_t id)return id & (EE_HASHES -1 ); } -obd_valid rce_ops2valid (int ops) +u64 rce_ops2valid (int ops) {switch (ops) {case RMT_LSETFACL :
drivers/staging/lustre/lustre/llite/lloop.c +1 -1
@@ -192,7 +192,7 @@ static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head)pgoff_t offset;int ret;int rw; -obd_count page_count =0 ; +u32 page_count =0 ;struct bio_vec bvec;struct bvec_iter iter;struct bio *bio;
drivers/staging/lustre/lustre/lmv/lmv_obd.c +4 -4
@@ -1377,7 +1377,7 @@ static int lmv_cleanup(struct obd_device *obd)return 0 ; } -static int lmv_process_config (struct obd_device *obd,obd_count len,void *buf) +static int lmv_process_config (struct obd_device *obd,u32 len,void *buf) {struct lustre_cfg *lcfg = buf;struct obd_uuid obd_uuid;
@@ -1478,7 +1478,7 @@ static int lmv_getstatus(struct obd_export *exp, }static int lmv_getxattr (struct obd_export *exp,const struct lu_fid *fid, -struct obd_capa *oc,obd_valid valid,const char *name, +struct obd_capa *oc,u64 valid,const char *name,const char *input,int input_size,int output_size,int flags,struct ptlrpc_request **request) {
@@ -1502,7 +1502,7 @@ static int lmv_getxattr(struct obd_export *exp, const struct lu_fid *fid, }static int lmv_setxattr (struct obd_export *exp,const struct lu_fid *fid, -struct obd_capa *oc,obd_valid valid,const char *name, +struct obd_capa *oc,u64 valid,const char *name,const char *input,int input_size,int output_size,int flags,__u32 suppgid,struct ptlrpc_request **request)
@@ -2369,7 +2369,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, }int lmv_set_info_async (const struct lu_env *env,struct obd_export *exp, -obd_count keylen,void *key,obd_count vallen, +u32 keylen,void *key,u32 vallen,void *val,struct ptlrpc_request_set *set) {struct lmv_tgt_desc *tgt;
drivers/staging/lustre/lustre/lov/lov_cl_internal.h +2 -2
@@ -515,12 +515,12 @@ struct lov_io {* starting position within a file, for the current io loop iteration * (stripe), used by ci_io_loop(). */ -obd_off lis_pos; +u64 lis_pos;/** * end position with in a file, for the current stripe io. This is * exclusive (i.e., next offset after last byte affected by io). */ -obd_off lis_endpos; +u64 lis_endpos;int lis_mem_frozen;int lis_stripe_count;
drivers/staging/lustre/lustre/lov/lov_ea.c +4 -4
@@ -143,18 +143,18 @@ static void lsm_unpackmd_common(struct lov_stripe_md *lsm,static void lsm_stripe_by_index_plain (struct lov_stripe_md *lsm,int *stripeno, -obd_off *lov_off,obd_off *swidth) +u64 *lov_off,u64 *swidth) {if (swidth) - *swidth = (obd_off )lsm->lsm_stripe_size * lsm->lsm_stripe_count; + *swidth = (u64 )lsm->lsm_stripe_size * lsm->lsm_stripe_count; }static void lsm_stripe_by_offset_plain (struct lov_stripe_md *lsm,int *stripeno, -obd_off *lov_off,obd_off *swidth) +u64 *lov_off,u64 *swidth) {if (swidth) - *swidth = (obd_off )lsm->lsm_stripe_size * lsm->lsm_stripe_count; + *swidth = (u64 )lsm->lsm_stripe_size * lsm->lsm_stripe_count; } static int lsm_destroy_plain(struct lov_stripe_md *lsm, struct obdo *oa,
drivers/staging/lustre/lustre/lov/lov_internal.h +14 -14
@@ -90,8 +90,8 @@ struct lov_request {int rq_rc;int rq_buflen;/* length of sub_md */ -obd_count rq_oabufs; -obd_count rq_pgaidx; +u32 rq_oabufs; +u32 rq_pgaidx; };struct lov_request_set {
@@ -109,7 +109,7 @@ struct lov_request_set {struct llog_cookie *set_cookies;int set_cookie_sent;struct obd_trans_info *set_oti; -obd_count set_oabufs; +u32 set_oabufs;struct brw_page *set_pga;struct lov_lock_handles *set_lockh;struct list_head set_list;
@@ -166,26 +166,26 @@ static inline void lov_llh_put(struct lov_lock_handles *llh) (char *)((lv)->lov_tgts[index]->ltd_uuid.uuid) /* lov_merge.c */ -void lov_merge_attrs (struct obdo *tgt,struct obdo *src,obd_valid valid, +void lov_merge_attrs (struct obdo *tgt,struct obdo *src,u64 valid,struct lov_stripe_md *lsm,int stripeno,int *set);int lov_merge_lvb (struct obd_export *exp,struct lov_stripe_md *lsm,struct ost_lvb *lvb,int kms_only);int lov_adjust_kms (struct obd_export *exp,struct lov_stripe_md *lsm, -obd_off size,int shrink); +u64 size,int shrink);int lov_merge_lvb_kms (struct lov_stripe_md *lsm,struct ost_lvb *lvb,__u64 *kms_place);/* lov_offset.c */ -obd_size lov_stripe_size (struct lov_stripe_md *lsm,obd_size ost_size, +u64 lov_stripe_size (struct lov_stripe_md *lsm,u64 ost_size,int stripeno); -int lov_stripe_offset (struct lov_stripe_md *lsm,obd_off lov_off, -int stripeno,obd_off *obd_off); -obd_off lov_size_to_stripe (struct lov_stripe_md *lsm,obd_off file_size, +int lov_stripe_offset (struct lov_stripe_md *lsm,u64 lov_off, +int stripeno,u64 *u64); +u64 lov_size_to_stripe (struct lov_stripe_md *lsm,u64 file_size,int stripeno);int lov_stripe_intersects (struct lov_stripe_md *lsm,int stripeno, -obd_off start,obd_off end, -obd_off *obd_start,obd_off *obd_end); -int lov_stripe_number (struct lov_stripe_md *lsm,obd_off lov_off); +u64 start,u64 end, +u64 *obd_start,u64 *obd_end); +int lov_stripe_number (struct lov_stripe_md *lsm,u64 lov_off);/* lov_qos.c */ #define LOV_USES_ASSIGNED_STRIPE 0
@@ -214,7 +214,7 @@ int lov_prep_create_set(struct obd_export *exp, struct obd_info *oifo,int cb_create_update (void *cookie,int rc);int lov_fini_create_set (struct lov_request_set *set,struct lov_stripe_md **ea);int lov_prep_brw_set (struct obd_export *exp,struct obd_info *oinfo, -obd_count oa_bufs,struct brw_page *pga, +u32 oa_bufs,struct brw_page *pga,struct obd_trans_info *oti,struct lov_request_set **reqset);int lov_fini_brw_set (struct lov_request_set *set);
@@ -239,7 +239,7 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_request_set **reqset);int lov_fini_punch_set (struct lov_request_set *set);int lov_prep_sync_set (struct obd_export *exp,struct obd_info *obd_info, -obd_off start,obd_off end, +u64 start,u64 end,struct lov_request_set **reqset);int lov_fini_sync_set (struct lov_request_set *set); int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo,
drivers/staging/lustre/lustre/lov/lov_io.c +4 -4
@@ -366,7 +366,7 @@ static void lov_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)wake_up_all (&lov->lo_waitq); } -static obd_off lov_offset_mod (obd_off val,int delta) +static u64 lov_offset_mod (u64 val,int delta) {if (val !=OBD_OBJECT_EOF ) val += delta;
@@ -379,9 +379,9 @@ static int lov_io_iter_init(const struct lu_env *env,struct lov_io *lio =cl2lov_io (env, ios);struct lov_stripe_md *lsm = lio->lis_object->lo_lsm;struct lov_io_sub *sub; -obd_off endpos; -obd_off start; -obd_off end; +u64 endpos; +u64 start; +u64 end;int stripe;int rc =0 ;
drivers/staging/lustre/lustre/lov/lov_lock.c +12 -12
@@ -290,10 +290,10 @@ static int lov_lock_sub_init(const struct lu_env *env,int result =0 ;int i;int nr; -obd_off start; -obd_off end; -obd_off file_start; -obd_off file_end; +u64 start; +u64 end; +u64 file_start; +u64 file_end;struct lov_object *loo =cl2lov (lck->lls_cl.cls_obj);struct lov_layout_raid0 *r0 =lov_r0 (loo);
@@ -860,10 +860,10 @@ static int lock_lock_multi_match()struct lov_layout_raid0 *r0 =lov_r0 (loo);struct lov_lock_sub *sub;struct cl_object *subobj; -obd_off fstart; -obd_off fend; -obd_off start; -obd_off end; +u64 fstart; +u64 fend; +u64 start; +u64 end;int i; fstart =cl_offset (need->cld_obj, need->cld_start);
@@ -900,8 +900,8 @@ static int lov_lock_stripe_is_matching(const struct lu_env *env, const struct cl_lock_descr *descr) {struct lov_stripe_md *lsm = lov->lo_lsm; -obd_off start; -obd_off end; +u64 start; +u64 end;int result;if (lov_r0 (lov)->lo_nr ==1 )
@@ -919,8 +919,8 @@ static int lov_lock_stripe_is_matching(const struct lu_env *env, stripe ==lov_stripe_number (lsm, end);if (result) {struct cl_lock_descr *subd = &lov_env_info (env)->lti_ldescr; -obd_off sub_start; -obd_off sub_end; +u64 sub_start; +u64 sub_end; subd->cld_obj =NULL ;/* don't need sub object at all */ subd->cld_mode = descr->cld_mode;
drivers/staging/lustre/lustre/lov/lov_merge.c +7 -7
@@ -52,9 +52,9 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm,__u64 size =0 ;__u64 kms =0 ;__u64 blocks =0 ; -obd_time current_mtime = lvb->lvb_mtime; -obd_time current_atime = lvb->lvb_atime; -obd_time current_ctime = lvb->lvb_ctime; +s64 current_mtime = lvb->lvb_mtime; +s64 current_atime = lvb->lvb_atime; +s64 current_ctime = lvb->lvb_ctime;int i;int rc =0 ;
@@ -66,7 +66,7 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm, lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);for (i =0 ; i < lsm->lsm_stripe_count; i++) {struct lov_oinfo *loi = lsm->lsm_oinfo[i]; -obd_size lov_size, tmpsize; +u64 lov_size, tmpsize;if (OST_LVB_IS_ERR (loi->loi_lvb.lvb_blocks)) { rc =OST_LVB_GET_ERR (loi->loi_lvb.lvb_blocks);
@@ -138,7 +138,7 @@ int lov_merge_lvb(struct obd_export *exp,/* Must be called under the lov_stripe_lock() */ int lov_adjust_kms (struct obd_export *exp,struct lov_stripe_md *lsm, -obd_off size,int shrink) +u64 size,int shrink) {struct lov_oinfo *loi;int stripe =0 ;
@@ -173,7 +173,7 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,return 0 ; } -void lov_merge_attrs (struct obdo *tgt,struct obdo *src,obd_valid valid, +void lov_merge_attrs (struct obdo *tgt,struct obdo *src,u64 valid,struct lov_stripe_md *lsm,int stripeno,int *set) { valid &= src->o_valid;
@@ -181,7 +181,7 @@ void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_valid valid,if (*set) {if (valid &OBD_MD_FLSIZE ) {/* this handles sparse files properly */ -obd_size lov_size; +u64 lov_size; lov_size =lov_stripe_size (lsm, src->o_size, stripeno);if (lov_size > tgt->o_size)
drivers/staging/lustre/lustre/lov/lov_obd.c +22 -22
118 lines not on this page · raw message
drivers/staging/lustre/lustre/lov/lov_offset.c +14 -15
@@ -43,13 +43,13 @@#include "lov_internal.h" /* compute object size given "stripeno" and the ost size */ -obd_size lov_stripe_size (struct lov_stripe_md *lsm,obd_size ost_size, +u64 lov_stripe_size (struct lov_stripe_md *lsm,u64 ost_size,int stripeno) {unsigned long ssize = lsm->lsm_stripe_size;unsigned long stripe_size; -obd_off swidth; -obd_size lov_size; +u64 swidth; +u64 lov_size;int magic = lsm->lsm_magic;if (ost_size ==0 )
@@ -116,11 +116,11 @@ obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size,* was moved forward to the start of the stripe in question; 0 when it * falls in the stripe and no shifting was done; > 0 when the offset * was outside the stripe and was pulled back to its final byte. */ -int lov_stripe_offset (struct lov_stripe_md *lsm,obd_off lov_off, -int stripeno,obd_off *obdoff) +int lov_stripe_offset (struct lov_stripe_md *lsm,u64 lov_off, +int stripeno,u64 *obdoff) {unsigned long ssize = lsm->lsm_stripe_size; -obd_off stripe_off, this_stripe, swidth; +u64 stripe_off, this_stripe, swidth;int magic = lsm->lsm_magic;int ret =0 ;
@@ -137,7 +137,7 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,/* lov_do_div64(a, b) returns a % b, and a = a / b */ stripe_off =lov_do_div64 (lov_off, swidth); - this_stripe = (obd_off )stripeno * ssize; + this_stripe = (u64 )stripeno * ssize;if (stripe_off < this_stripe) { stripe_off =0 ; ret =-1 ;
@@ -173,11 +173,11 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,* | 0 | 1 | 2 | 0 | 1 | 2 | * --------------------------------------------------------------------- */ -obd_off lov_size_to_stripe (struct lov_stripe_md *lsm,obd_off file_size, -int stripeno) +u64 lov_size_to_stripe (struct lov_stripe_md *lsm,u64 file_size, +int stripeno) {unsigned long ssize = lsm->lsm_stripe_size; -obd_off stripe_off, this_stripe, swidth; +u64 stripe_off, this_stripe, swidth;int magic = lsm->lsm_magic;if (file_size ==OBD_OBJECT_EOF )
@@ -190,7 +190,7 @@ obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size,/* lov_do_div64(a, b) returns a % b, and a = a / b */ stripe_off =lov_do_div64 (file_size, swidth); - this_stripe = (obd_off )stripeno * ssize; + this_stripe = (u64 )stripeno * ssize;if (stripe_off < this_stripe) {/* Move to end of previous stripe, or zero */ if (file_size >0 ) {
@@ -215,8 +215,7 @@ obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size,* that is contained within the lov extent. this returns true if the given * stripe does intersect with the lov extent. */ int lov_stripe_intersects (struct lov_stripe_md *lsm,int stripeno, -obd_off start,obd_off end, -obd_off *obd_start,obd_off *obd_end) +u64 start,u64 end,u64 *obd_start,u64 *obd_end) {int start_side, end_side;
@@ -247,10 +246,10 @@ int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, }/* compute which stripe number "lov_off" will be written into */ -int lov_stripe_number (struct lov_stripe_md *lsm,obd_off lov_off) +int lov_stripe_number (struct lov_stripe_md *lsm,u64 lov_off) {unsigned long ssize = lsm->lsm_stripe_size; -obd_off stripe_off, swidth; +u64 stripe_off, swidth;int magic = lsm->lsm_magic;LASSERT (lsm_op_find (magic) !=NULL );
drivers/staging/lustre/lustre/lov/lov_pack.c +2 -2
@@ -125,7 +125,7 @@ void lov_dump_lmm(int level, void *lmm)* * XXX In the future, this will be enhanced to get the EA size from the * underlying OSC device(s) to get their EA sizes so we can stack -* LOVs properly. For now lov_mds_md_size() just assumes one obd_id +* LOVs properly. For now lov_mds_md_size() just assumes one u64 * per stripe. */ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
@@ -538,7 +538,7 @@ int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,int rc;struct obd_export *oexp;struct lov_obd *lov = &exp->exp_obd->u.lov; -obd_id last_id =0 ; +u64 last_id =0 ;struct lov_user_ost_data_v1 *lmm_objects;if (lump->lmm_magic ==LOV_USER_MAGIC_V3 )
drivers/staging/lustre/lustre/lov/lov_page.c +1 -1
@@ -165,7 +165,7 @@ int lov_page_init_raid0(const struct lu_env *env, struct cl_object *obj,struct lov_io_sub *sub;struct lov_page *lpg =cl_object_page_slice (obj, page);loff_t offset; -obd_off suboff; +u64 suboff;int stripe;int rc;
drivers/staging/lustre/lustre/lov/lov_request.c +9 -9
@@ -375,7 +375,7 @@ int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo, for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi; struct lov_request *req; - obd_off start, end; + u64 start, end; loi = oinfo->oi_md->lsm_oinfo[i]; if (!lov_stripe_intersects(oinfo->oi_md, i,
@@ -481,7 +481,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo, for (i = 0; i < lsm->lsm_stripe_count; i++) { struct lov_oinfo *loi; struct lov_request *req; - obd_off start, end; + u64 start, end; loi = lsm->lsm_oinfo[i]; if (!lov_stripe_intersects(lsm, i, policy->l_extent.start,
@@ -696,14 +696,14 @@ int lov_fini_brw_set(struct lov_request_set *set) }int lov_prep_brw_set (struct obd_export *exp,struct obd_info *oinfo, -obd_count oa_bufs,struct brw_page *pga, +u32 oa_bufs,struct brw_page *pga,struct obd_trans_info *oti,struct lov_request_set **reqset) {struct { -obd_count index; -obd_count count; -obd_count off; +u32 index; +u32 count; +u32 off; } *info =NULL ;struct lov_request_set *set;struct lov_obd *lov = &exp->exp_obd->u.lov;
@@ -1167,7 +1167,7 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi = oinfo->oi_md->lsm_oinfo[i]; struct lov_request *req; - obd_off rs, re; + u64 rs, re; if (!lov_stripe_intersects(oinfo->oi_md, i, oinfo->oi_policy.l_extent.start,
@@ -1246,7 +1246,7 @@ static int cb_sync_update(void *cookie, int rc) }int lov_prep_sync_set (struct obd_export *exp,struct obd_info *oinfo, -obd_off start,obd_off end, +u64 start,u64 end,struct lov_request_set **reqset) {struct lov_request_set *set;
@@ -1264,7 +1264,7 @@ int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo,for (i =0 ; i < oinfo->oi_md->lsm_stripe_count; i++) {struct lov_oinfo *loi = oinfo->oi_md->lsm_oinfo[i];struct lov_request *req; -obd_off rs, re; +u64 rs, re;if (!lov_check_and_wait_active (lov, loi->loi_ost_idx)) {CDEBUG (D_HA ,"lov idx %d inactive\n" , loi->loi_ost_idx);
drivers/staging/lustre/lustre/lov/lovsub_dev.c +1 -1
@@ -67,7 +67,7 @@ static void lovsub_req_completion(const struct lu_env *env,static void lovsub_req_attr_set (const struct lu_env *env,const struct cl_req_slice *slice,const struct cl_object *obj, -struct cl_req_attr *attr,obd_valid flags) +struct cl_req_attr *attr,u64 flags) {struct lovsub_object *subobj;
drivers/staging/lustre/lustre/mdc/mdc_internal.h +1 -1
@@ -108,7 +108,7 @@ int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid,int mdc_fid_alloc (struct obd_export *exp,struct lu_fid *fid,struct md_op_data *op_data); -int mdc_open (struct obd_export *exp,obd_id ino,int type,int flags, +int mdc_open (struct obd_export *exp,u64 ino,int type,int flags,struct lov_mds_md *lmm,int lmm_size,struct lustre_handle *fh,struct ptlrpc_request **);
drivers/staging/lustre/lustre/mdc/mdc_locks.c +1 -1
@@ -455,7 +455,7 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp, {struct ptlrpc_request *req;struct obd_device *obddev =class_exp2obd (exp); -obd_valid valid =OBD_MD_FLGETATTR |OBD_MD_FLEASIZE | +u64 valid =OBD_MD_FLGETATTR |OBD_MD_FLEASIZE |OBD_MD_FLMODEASIZE |OBD_MD_FLDIREA | OBD_MD_FLMDSCAPA | OBD_MD_MEA | (client_is_remote(exp) ?
drivers/staging/lustre/lustre/mdc/mdc_request.c +7 -7
@@ -331,7 +331,7 @@ static int mdc_is_subdir(struct obd_export *exp,static int mdc_xattr_common (struct obd_export *exp,const struct req_format *fmt,const struct lu_fid *fid, -struct obd_capa *oc,int opcode,obd_valid valid, +struct obd_capa *oc,int opcode,u64 valid,const char *xattr_name,const char *input,int input_size,int output_size,int flags,__u32 suppgid,struct ptlrpc_request **request)
@@ -440,7 +440,7 @@ static int mdc_xattr_common(struct obd_export *exp, }int mdc_setxattr (struct obd_export *exp,const struct lu_fid *fid, -struct obd_capa *oc,obd_valid valid,const char *xattr_name, +struct obd_capa *oc,u64 valid,const char *xattr_name,const char *input,int input_size,int output_size,int flags,__u32 suppgid,struct ptlrpc_request **request) {
@@ -451,7 +451,7 @@ int mdc_setxattr(struct obd_export *exp, const struct lu_fid *fid, }int mdc_getxattr (struct obd_export *exp,const struct lu_fid *fid, -struct obd_capa *oc,obd_valid valid,const char *xattr_name, +struct obd_capa *oc,u64 valid,const char *xattr_name,const char *input,int input_size,int output_size,int flags,struct ptlrpc_request **request) {
@@ -1926,7 +1926,7 @@ out: }int mdc_get_info_rpc (struct obd_export *exp, -obd_count keylen,void *key, +u32 keylen,void *key,int vallen,void *val) {struct obd_import *imp =class_exp2cliimp (exp);
@@ -2101,8 +2101,8 @@ static int mdc_kuc_reregister(struct obd_import *imp)int mdc_set_info_async (const struct lu_env *env,struct obd_export *exp, -obd_count keylen,void *key, -obd_count vallen,void *val, +u32 keylen,void *key, +u32 vallen,void *val,struct ptlrpc_request_set *set) {struct obd_import *imp =class_exp2cliimp (exp);
@@ -2573,7 +2573,7 @@ static int mdc_llog_finish(struct obd_device *obd, int count)return 0 ; } -static int mdc_process_config (struct obd_device *obd,obd_count len,void *buf) +static int mdc_process_config (struct obd_device *obd,u32 len,void *buf) {struct lustre_cfg *lcfg = buf;struct lprocfs_static_vars lvars = {NULL };
drivers/staging/lustre/lustre/mgc/mgc_request.c +2 -2
@@ -1100,7 +1100,7 @@ static int mgc_target_register(struct obd_export *exp, }int mgc_set_info_async (const struct lu_env *env,struct obd_export *exp, -obd_count keylen,void *key,obd_count vallen, +u32 keylen,void *key,u32 vallen,void *val,struct ptlrpc_request_set *set) {int rc = -EINVAL ;
@@ -1844,7 +1844,7 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)* LCFG_LOG_START gets the config log from the MGS, processes it to start * any services, and adds it to the list logs to watch (follow). */ -static int mgc_process_config (struct obd_device *obd,obd_count len,void *buf) +static int mgc_process_config (struct obd_device *obd,u32 len,void *buf) {struct lustre_cfg *lcfg = buf;struct config_llog_instance *cfg =NULL ;
drivers/staging/lustre/lustre/obdclass/cl_io.c +1 -1
@@ -1560,7 +1560,7 @@ EXPORT_SYMBOL(cl_req_prep);* for the same request. */ void cl_req_attr_set (const struct lu_env *env,struct cl_req *req, -struct cl_req_attr *attr,obd_valid flags) +struct cl_req_attr *attr,u64 flags) {const struct cl_req_slice *slice;struct cl_page *page;
drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +4 -4
@@ -52,7 +52,7 @@/*FIXME: Just copy from obdo_from_inode*/ void obdo_from_la (struct obdo *dst,struct lu_attr *la,__u64 valid) { -obd_flag newvalid =0 ; +u32 newvalid =0 ;if (valid &LA_ATIME ) { dst->o_atime = la->la_atime;
@@ -97,7 +97,7 @@ void obdo_from_la(struct obdo *dst, struct lu_attr *la, __u64 valid)EXPORT_SYMBOL (obdo_from_la);/*FIXME: Just copy from obdo_from_inode*/ -void la_from_obdo (struct lu_attr *dst,struct obdo *obdo,obd_flag valid) +void la_from_obdo (struct lu_attr *dst,struct obdo *obdo,u32 valid) {__u64 newvalid =0 ;
@@ -145,7 +145,7 @@ void la_from_obdo(struct lu_attr *dst, struct obdo *obdo, obd_flag valid) }EXPORT_SYMBOL (la_from_obdo); -void obdo_refresh_inode (struct inode *dst,struct obdo *src,obd_flag valid) +void obdo_refresh_inode (struct inode *dst,struct obdo *src,u32 valid) { valid &= src->o_valid;
@@ -180,7 +180,7 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid) }EXPORT_SYMBOL (obdo_refresh_inode); -void obdo_to_inode (struct inode *dst,struct obdo *src,obd_flag valid) +void obdo_to_inode (struct inode *dst,struct obdo *src,u32 valid) { valid &= src->o_valid;
drivers/staging/lustre/lustre/obdclass/local_storage.c +1 -1
@@ -745,7 +745,7 @@ int local_oid_storage_init(const struct lu_env *env, struct dt_device *dev, {struct dt_thread_info *dti =dt_info (env);struct ls_device *ls; -obd_id lastid; +u64 lastid;struct dt_object *o =NULL ;struct thandle *th;__u32 first_oid =fid_oid (first_fid);
drivers/staging/lustre/lustre/obdclass/obdo.c +6 -6
@@ -56,9 +56,9 @@ EXPORT_SYMBOL(obdo_set_parent_fid);/* WARNING: the file systems must take care not to tinker with attributes they don't manage (such as blocks). */ -void obdo_from_inode (struct obdo *dst,struct inode *src,obd_flag valid) +void obdo_from_inode (struct obdo *dst,struct inode *src,u32 valid) { -obd_flag newvalid =0 ; +u32 newvalid =0 ;if (valid & (OBD_MD_FLCTIME |OBD_MD_FLMTIME )) CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
@@ -115,7 +115,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid) }EXPORT_SYMBOL (obdo_from_inode); -void obdo_cpy_md (struct obdo *dst,struct obdo *src,obd_flag valid) +void obdo_cpy_md (struct obdo *dst,struct obdo *src,u32 valid) {CDEBUG (D_INODE ,"src obdo " DOSTID " valid %#llx, dst obdo " DOSTID "\n" ,POSTID (&src->o_oi), src->o_valid,POSTID (&dst->o_oi));
@@ -157,7 +157,7 @@ void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)EXPORT_SYMBOL (obdo_cpy_md);/* returns FALSE if comparison (by flags) is same, TRUE if changed */ -int obdo_cmp_md (struct obdo *dst,struct obdo *src,obd_flag compare) +int obdo_cmp_md (struct obdo *dst,struct obdo *src,u32 compare) {int res =0 ;
@@ -247,7 +247,7 @@ void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned int ia_valid) }EXPORT_SYMBOL (obdo_from_iattr); -void iattr_from_obdo (struct iattr *attr,struct obdo *oa,obd_flag valid) +void iattr_from_obdo (struct iattr *attr,struct obdo *oa,u32 valid) { valid &= oa->o_valid;
@@ -296,7 +296,7 @@ void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid) }EXPORT_SYMBOL (iattr_from_obdo); -void md_from_obdo (struct md_op_data *op_data,struct obdo *oa,obd_flag valid) +void md_from_obdo (struct md_op_data *op_data,struct obdo *oa,u32 valid) {iattr_from_obdo (&op_data->op_attr, oa, valid);if (valid &OBD_MD_FLBLOCKS ) {
drivers/staging/lustre/lustre/obdecho/echo.c +11 -10
@@ -104,7 +104,7 @@ static int echo_destroy_export(struct obd_export *exp)static __u64 echo_next_id (struct obd_device *obddev) { -obd_id id; +u64 id;spin_lock (&obddev->u.echo.eo_lock); id = ++obddev->u.echo.eo_lastino;
@@ -173,7 +173,7 @@ static int echo_getattr(const struct lu_env *env, struct obd_export *exp, struct obd_info *oinfo) {struct obd_device *obd =class_exp2obd (exp); -obd_id id =ostid_id (&oinfo->oi_oa->o_oi); +u64 id =ostid_id (&oinfo->oi_oa->o_oi);if (!obd) { CERROR("invalid client cookie %#llx\n",
@@ -224,7 +224,7 @@ static int echo_setattr(const struct lu_env *env, struct obd_export *exp, }static void -echo_page_debug_setup (struct page *page,int rw,obd_id id, +echo_page_debug_setup (struct page *page,int rw,u64 id,__u64 offset,int len) {int page_offset = offset & ~CFS_PAGE_MASK ;
@@ -251,7 +251,7 @@ echo_page_debug_setup(struct page *page, int rw, obd_id id, }static int -echo_page_debug_check (struct page *page,obd_id id, +echo_page_debug_check (struct page *page,u64 id,__u64 offset,int len) {int page_offset = offset & ~CFS_PAGE_MASK ;
@@ -293,7 +293,7 @@ static int echo_map_nb_to_lb(struct obdo *oa, struct obd_ioobj *obj, (oa->o_valid &OBD_MD_FLFLAGS ) !=0 && (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0);struct niobuf_local *res = lb; -obd_off offset = nb->offset; +u64 offset = nb->offset;int len = nb->len;while (len >0 ) {
@@ -354,11 +354,12 @@ static int echo_finalize_lb(struct obdo *oa, struct obd_ioobj *obj, struct niobuf_local *lb, int verify) {struct niobuf_local *res = lb; -obd_off start = rb->offset >>PAGE_CACHE_SHIFT ; -obd_off end = (rb->offset + rb->len +PAGE_CACHE_SIZE -1 ) >>PAGE_CACHE_SHIFT ; -int count = (int )(end - start); -int rc =0 ; -int i; +u64 start = rb->offset >>PAGE_CACHE_SHIFT ; +u64 end = (rb->offset + rb->len +PAGE_CACHE_SIZE -1 ) >> +PAGE_CACHE_SHIFT ; +int count = (int )(end - start); +int rc =0 ; +int i;for (i =0 ; i < count; i++, (*pgs) ++, res++) {struct page *page = res->page;
drivers/staging/lustre/lustre/obdecho/echo_client.c +29 -29
155 lines not on this page · raw message
drivers/staging/lustre/lustre/osc/lproc_osc.c +1 -1
@@ -148,7 +148,7 @@ static ssize_t osc_max_dirty_mb_seq_write(struct file *file, const char *buffer,return -ERANGE ;client_obd_list_lock (&cli->cl_loi_list_lock); - cli->cl_dirty_max = (obd_count)(pages_number <<PAGE_CACHE_SHIFT ); + cli->cl_dirty_max = (u32)(pages_number <<PAGE_CACHE_SHIFT );osc_wake_cache_waiters (cli);client_obd_list_unlock (&cli->cl_loi_list_lock);
drivers/staging/lustre/lustre/osc/osc_cache.c +1 -1
@@ -1885,7 +1885,7 @@ osc_send_write_rpc(const struct lu_env *env, struct client_obd *cli,struct osc_extent *ext;struct osc_extent *tmp;struct osc_extent *first =NULL ; -obd_count page_count =0 ; +u32 page_count =0 ;int srvlock =0 ;int rc =0 ;
drivers/staging/lustre/lustre/osc/osc_cl_internal.h +1 -1
@@ -435,7 +435,7 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, enum cl_req_type crt, int brw_flags);int osc_cancel_async_page (const struct lu_env *env,struct osc_page *ops);int osc_set_async_flags (struct osc_object *obj,struct osc_page *opg, -obd_flag async_flags); +u32 async_flags);int osc_prep_async_page (struct osc_object *osc,struct osc_page *ops,struct page *page,loff_t offset); int osc_queue_async_io(const struct lu_env *env, struct cl_io *io,
drivers/staging/lustre/lustre/osc/osc_internal.h +3 -3
@@ -59,7 +59,7 @@ struct osc_async_page {struct list_head oap_pending_item;struct list_head oap_rpc_item; -obd_off oap_obj_off; +u64 oap_obj_off;unsigned oap_page_off;enum async_flags oap_async_flags;
@@ -192,12 +192,12 @@ extern struct kmem_cache *osc_quota_kmem;struct osc_quota_info {/** linkage for quota hash table */ struct hlist_node oqi_hash; -obd_uid oqi_id; +u32 oqi_id; };int osc_quota_setup (struct obd_device *obd);int osc_quota_cleanup (struct obd_device *obd);int osc_quota_setdq (struct client_obd *cli,const unsigned int qid[], -obd_flag valid,obd_flag flags); +u32 valid,u32 flags);int osc_quota_chkdq (struct client_obd *cli,const unsigned int qid[]);int osc_quotactl (struct obd_device *unused,struct obd_export *exp,struct obd_quotactl *oqctl);
drivers/staging/lustre/lustre/osc/osc_io.c +1 -1
@@ -711,7 +711,7 @@ static void osc_req_completion(const struct lu_env *env,static void osc_req_attr_set (const struct lu_env *env,const struct cl_req_slice *slice,const struct cl_object *obj, -struct cl_req_attr *attr,obd_valid flags) +struct cl_req_attr *attr,u64 flags) {struct lov_oinfo *oinfo;struct cl_req *clerq;
drivers/staging/lustre/lustre/osc/osc_quota.c +4 -4
@@ -31,7 +31,7 @@#include "../include/obd_ost.h" #include "osc_internal.h" -static inline struct osc_quota_info *osc_oqi_alloc (obd_uid id) +static inline struct osc_quota_info *osc_oqi_alloc (u32 id) {struct osc_quota_info *oqi;
@@ -71,7 +71,7 @@ int osc_quota_chkdq(struct client_obd *cli, const unsigned int qid[]) : OBD_FL_NO_GRPQUOTA)int osc_quota_setdq (struct client_obd *cli,const unsigned int qid[], -obd_flag valid,obd_flag flags) +u32 valid,u32 flags) {int type;int rc =0 ;
@@ -145,10 +145,10 @@ static int oqi_keycmp(const void *key, struct hlist_node *hnode) { struct osc_quota_info *oqi; -obd_uid uid; +u32 uid;LASSERT (key !=NULL ); - uid = *((obd_uid *)key); + uid = *((u32 *)key); oqi = hlist_entry(hnode, struct osc_quota_info, oqi_hash);return uid == oqi->oqi_id;
drivers/staging/lustre/lustre/osc/osc_request.c +23 -23
178 lines not on this page · raw message
drivers/staging/lustre/lustre/ptlrpc/layout.c +2 -2
@@ -1094,8 +1094,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 ("u64" ,0 , +sizeof (u64), lustre_swab_ost_last_id,NULL );EXPORT_SYMBOL (RMF_OBD_ID ); struct req_msg_field RMF_FID =
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +3 -3
@@ -1600,8 +1600,8 @@ EXPORT_SYMBOL(ptlrpc_req_set_repsize);*/ int do_set_info_async (struct obd_import *imp,int opcode,int version, -obd_count keylen,void *key, -obd_count vallen,void *val, +u32 keylen,void *key, +u32 vallen,void *val,struct ptlrpc_request_set *set) {struct ptlrpc_request *req;
@@ -1797,7 +1797,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); }
Signature · 1 line
1.9.3