From 95f85ba9ed5df66a0385755be62254322fc447e1 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Fri, 19 Dec 2014 16:28:54 +0300 Subject: [PATCH] LU-5478 llite: get rid of obd_* typedefs We 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 and lustre_ioctl.h where they are replaced with __uXX and __sXX to be able to be included in userspace patch 2 in series: modify llite Signed-off-by: Oleg Drokin Signed-off-by: Dmitry Eremin Change-Id: Idfa717f29cb47e4dd8c05cc956be3fb883cb1ba7 Reviewed-on: http://review.whamcloud.com/13143 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: John L. Hammond --- lustre/llite/dir.c | 6 +++--- lustre/llite/file.c | 14 +++++++------- lustre/llite/lcommon_cl.c | 12 ++++++------ lustre/llite/llite_internal.h | 10 +++++----- lustre/llite/llite_lib.c | 2 +- lustre/llite/llite_rmtacl.c | 2 +- lustre/llite/lloop.c | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 8af20a0..d44eca7 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -576,7 +576,7 @@ end: * Each time, it can only retrieve 1 stripe EA **/ int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size, - struct ptlrpc_request **request, obd_valid valid) + struct ptlrpc_request **request, u64 valid) { struct ll_sb_info *sbi = ll_i2sbi(inode); struct mdt_body *body; @@ -1208,7 +1208,7 @@ lmv_out_free: struct ptlrpc_request *request = NULL; union lmv_mds_md *lmm = NULL; int lmmsize; - obd_valid valid = 0; + u64 valid = 0; struct lmv_user_md *tmp = NULL; int mdt_index; int lum_size; @@ -1617,7 +1617,7 @@ out_rmdir: } #endif case LL_IOC_GETOBDCOUNT: { - int count, vallen; + u32 count, vallen; struct obd_export *exp; if (copy_from_user(&count, (int __user *)arg, sizeof(int))) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index a0f64ce..e4bed5d 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -1014,9 +1014,9 @@ int ll_merge_attr(const struct lu_env *env, struct inode *inode) struct ll_inode_info *lli = ll_i2info(inode); struct cl_object *obj = lli->lli_clob; struct cl_attr *attr = ccc_env_thread_attr(env); - obd_time atime; - obd_time mtime; - obd_time ctime; + s64 atime; + s64 mtime; + s64 ctime; int rc = 0; ENTRY; @@ -3228,10 +3228,10 @@ 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; - struct md_op_data *op_data; - int ealen = 0; + struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode); + u64 valid = OBD_MD_FLGETATTR; + struct md_op_data *op_data; + int ealen = 0; if (S_ISREG(inode->i_mode)) { rc = ll_get_default_mdsize(sbi, &ealen); diff --git a/lustre/llite/lcommon_cl.c b/lustre/llite/lcommon_cl.c index 8630e50..f7a47ed 100644 --- a/lustre/llite/lcommon_cl.c +++ b/lustre/llite/lcommon_cl.c @@ -487,13 +487,13 @@ void ccc_req_completion(const struct lu_env *env, * and capability. */ 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) + const struct cl_req_slice *slice, + const struct cl_object *obj, + struct cl_req_attr *attr, u64 flags) { - struct inode *inode; - struct obdo *oa; - obd_flag valid_flags; + struct inode *inode; + struct obdo *oa; + u32 valid_flags; oa = attr->cra_oa; inode = vvp_object_inode(obj); diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index f54d95f..f9e0086 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -173,9 +173,9 @@ struct ll_inode_info { struct inode lli_vfs_inode; /* the most recent timestamps obtained from mds */ - obd_time lli_atime; - obd_time lli_mtime; - obd_time lli_ctime; + s64 lli_atime; + s64 lli_mtime; + s64 lli_ctime; spinlock_t lli_agl_lock; /* Try to make the d::member and f::member are aligned. Before using @@ -876,7 +876,7 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump, int set_default); int ll_dir_getstripe(struct inode *inode, void **lmmp, int *lmm_size, struct ptlrpc_request **request, - obd_valid valid); + u64 valid); #ifdef HAVE_FILE_FSYNC_4ARGS int ll_fsync(struct file *file, loff_t start, loff_t end, int data); #elif defined(HAVE_FILE_FSYNC_2ARGS) @@ -1259,7 +1259,7 @@ void ll_ra_stats_inc(struct inode *inode, enum ra_stat which); /* llite/llite_rmtacl.c */ #ifdef CONFIG_FS_POSIX_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); diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index ee14f15..9330a85 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -180,7 +180,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; ENTRY; diff --git a/lustre/llite/llite_rmtacl.c b/lustre/llite/llite_rmtacl.c index a4f60a3..7188a49 100644 --- a/lustre/llite/llite_rmtacl.c +++ b/lustre/llite/llite_rmtacl.c @@ -57,7 +57,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: diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c index e220cd1..f3bf6de 100644 --- a/lustre/llite/lloop.c +++ b/lustre/llite/lloop.c @@ -199,7 +199,7 @@ static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head) struct bio_vec *bvec; #endif int rw; - obd_count page_count = 0; + size_t page_count = 0; struct bio *bio; ssize_t bytes; -- 1.8.3.1