diff options
Diffstat (limited to '')
46 files changed, 240 insertions, 251 deletions
diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index c809239c0866..e51cd690f907 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -97,10 +97,10 @@ /* * super-class definitions. */ -#include <lu_object.h> -#include <lvfs.h> -# include <linux/mutex.h> -# include <linux/radix-tree.h> +#include "lu_object.h" +#include "lvfs.h" +#include <linux/mutex.h> +#include <linux/radix-tree.h> struct inode; diff --git a/drivers/staging/lustre/lustre/include/dt_object.h b/drivers/staging/lustre/lustre/include/dt_object.h index 9b7921d1dea8..212ebaea8555 100644 --- a/drivers/staging/lustre/lustre/include/dt_object.h +++ b/drivers/staging/lustre/lustre/include/dt_object.h @@ -53,9 +53,9 @@ /* * super-class definitions. */ -#include <lu_object.h> +#include "lu_object.h" -#include <linux/libcfs/libcfs.h> +#include "../../include/linux/libcfs/libcfs.h" struct seq_file; struct proc_dir_entry; @@ -1481,7 +1481,7 @@ static inline struct dt_thread_info *dt_info(const struct lu_env *env) int dt_global_init(void); void dt_global_fini(void); -# ifdef LPROCFS +#if defined (CONFIG_PROC_FS) int lprocfs_dt_rd_blksize(char *page, char **start, off_t off, int count, int *eof, void *data); int lprocfs_dt_rd_kbytestotal(char *page, char **start, off_t off, @@ -1494,6 +1494,6 @@ int lprocfs_dt_rd_filestotal(char *page, char **start, off_t off, int count, int *eof, void *data); int lprocfs_dt_rd_filesfree(char *page, char **start, off_t off, int count, int *eof, void *data); -# endif /* LPROCFS */ +#endif /* CONFIG_PROC_FS */ #endif /* __LUSTRE_DT_OBJECT_H */ diff --git a/drivers/staging/lustre/lustre/include/interval_tree.h b/drivers/staging/lustre/lustre/include/interval_tree.h index dfdb8aa4e035..1815783edae6 100644 --- a/drivers/staging/lustre/lustre/include/interval_tree.h +++ b/drivers/staging/lustre/lustre/include/interval_tree.h @@ -40,7 +40,7 @@ #ifndef _INTERVAL_H__ #define _INTERVAL_H__ -#include <linux/libcfs/libcfs.h> /* LASSERT. */ +#include "../../include/linux/libcfs/libcfs.h" /* LASSERT. */ struct interval_node { struct interval_node *in_left; diff --git a/drivers/staging/lustre/lustre/include/linux/lprocfs_status.h b/drivers/staging/lustre/lustre/include/linux/lprocfs_status.h index 4bcc4dcca3da..cb76b5d6f71a 100644 --- a/drivers/staging/lustre/lustre/include/linux/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/linux/lprocfs_status.h @@ -50,7 +50,7 @@ #include <linux/seq_file.h> #include <linux/smp.h> #include <linux/rwsem.h> -#include <linux/libcfs/libcfs.h> +#include "../../../include/linux/libcfs/libcfs.h" #include <linux/statfs.h> diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_acl.h b/drivers/staging/lustre/lustre/include/linux/lustre_acl.h index a91c5497d22c..b17273d403bb 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_acl.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_acl.h @@ -56,7 +56,7 @@ (sizeof(posix_acl_xattr_header) + \ LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry)) -#include <linux/lustre_intent.h> +#include "lustre_intent.h" #include <linux/xattr.h> /* XATTR_{REPLACE,CREATE} */ #ifndef LUSTRE_POSIX_ACL_MAX_SIZE diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h index 81cc7a0134bb..8621bac5058b 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h @@ -39,9 +39,9 @@ #include <linux/fs_struct.h> #include <linux/namei.h> -#include <linux/libcfs/linux/portals_compat25.h> +#include "../../../include/linux/libcfs/linux/portals_compat25.h" -#include <linux/lustre_patchless_compat.h> +#include "lustre_patchless_compat.h" # define LOCK_FS_STRUCT(fs) spin_lock(&(fs)->lock) # define UNLOCK_FS_STRUCT(fs) spin_unlock(&(fs)->lock) diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h b/drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h index 4da6e372e00b..d5c97beb66f5 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_fsfilt.h @@ -46,8 +46,8 @@ #endif -#include <obd.h> -#include <obd_class.h> +#include "../obd.h" +#include "../obd_class.h" typedef void (*fsfilt_cb_t)(struct obd_device *obd, __u64 last_rcvd, void *data, int error); @@ -90,12 +90,12 @@ static inline char *fsfilt_get_label(struct obd_device *obd, #define __fsfilt_check_slow(obd, start, msg) \ do { \ - if (cfs_time_before(jiffies, start + 15 * HZ)) \ + if (time_before(jiffies, start + 15 * HZ)) \ break; \ - else if (cfs_time_before(jiffies, start + 30 * HZ)) \ + else if (time_before(jiffies, start + 30 * HZ)) \ CDEBUG(D_VFSTRACE, "%s: slow %s %lus\n", obd->obd_name, \ msg, (jiffies-start) / HZ); \ - else if (cfs_time_before(jiffies, start + DISK_TIMEOUT * HZ)) \ + else if (time_before(jiffies, start + DISK_TIMEOUT * HZ)) \ CWARN("%s: slow %s %lus\n", obd->obd_name, msg, \ (jiffies - start) / HZ); \ else \ diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_lib.h b/drivers/staging/lustre/lustre/include/linux/lustre_lib.h index 57f3b01d1a32..0a4c65ae9242 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_lib.h @@ -49,8 +49,8 @@ # include <linux/sched.h> # include <linux/signal.h> # include <linux/types.h> -# include <linux/lustre_compat25.h> -# include <linux/lustre_common.h> +#include "lustre_compat25.h" +#include "lustre_common.h" #ifndef LP_POISON # define LI_POISON 0x5a5a5a5a diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h index df9391275617..99eed4987635 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h @@ -46,13 +46,13 @@ #include <linux/dcache.h> #include <linux/proc_fs.h> -#include <obd_class.h> -#include <lustre_net.h> -#include <lustre_ha.h> +#include "../obd_class.h" +#include "../lustre_net.h" +#include "../lustre_ha.h" #include <linux/rbtree.h> -#include <linux/lustre_compat25.h> -#include <linux/lustre_common.h> +#include "../../include/linux/lustre_compat25.h" +#include "../../include/linux/lustre_common.h" #include <linux/pagemap.h> /* lprocfs.c */ diff --git a/drivers/staging/lustre/lustre/include/linux/lvfs.h b/drivers/staging/lustre/lustre/include/linux/lvfs.h index e61f1b87f822..dd1be9c39829 100644 --- a/drivers/staging/lustre/lustre/include/linux/lvfs.h +++ b/drivers/staging/lustre/lustre/include/linux/lvfs.h @@ -45,9 +45,9 @@ #error Do not #include this file directly. #include <lvfs.h> instead #endif -#include <linux/lustre_compat25.h> -#include <linux/lustre_common.h> -#include <linux/lvfs_linux.h> +#include "lustre_compat25.h" +#include "lustre_common.h" +#include "lvfs_linux.h" #define LLOG_LVFS diff --git a/drivers/staging/lustre/lustre/include/linux/lvfs_linux.h b/drivers/staging/lustre/lustre/include/linux/lvfs_linux.h index 140a60f1f0c9..fff22ec1f869 100644 --- a/drivers/staging/lustre/lustre/include/linux/lvfs_linux.h +++ b/drivers/staging/lustre/lustre/include/linux/lvfs_linux.h @@ -41,15 +41,10 @@ #include <linux/namei.h> #include <linux/sched.h> -#include <lvfs.h> - -#define l_file file -#define l_dentry dentry - -#define l_filp_open filp_open +#include "../lvfs.h" struct lvfs_run_ctxt; -struct l_file *l_dentry_open(struct lvfs_run_ctxt *, struct l_dentry *, +struct file *l_dentry_open(struct lvfs_run_ctxt *, struct dentry *, int flags); struct l_linux_dirent { diff --git a/drivers/staging/lustre/lustre/include/linux/obd.h b/drivers/staging/lustre/lustre/include/linux/obd.h index f96f65d5168f..2a3a88cbb192 100644 --- a/drivers/staging/lustre/lustre/include/linux/obd.h +++ b/drivers/staging/lustre/lustre/include/linux/obd.h @@ -41,14 +41,14 @@ #error Do not #include this file directly. #include <obd.h> instead #endif -#include <obd_support.h> +#include "../obd_support.h" # include <linux/fs.h> # include <linux/list.h> # include <linux/sched.h> /* for struct task_struct, for current.h */ # include <linux/proc_fs.h> # include <linux/mount.h> -# include <linux/lustre_intent.h> +#include "lustre_intent.h" struct ll_iattr { struct iattr iattr; diff --git a/drivers/staging/lustre/lustre/include/linux/obd_support.h b/drivers/staging/lustre/lustre/include/linux/obd_support.h index 9166503408aa..ea03b8434f62 100644 --- a/drivers/staging/lustre/lustre/include/linux/obd_support.h +++ b/drivers/staging/lustre/lustre/include/linux/obd_support.h @@ -50,14 +50,14 @@ #include <linux/slab.h> #include <linux/highmem.h> #include <linux/swap.h> -#include <linux/lustre_compat25.h> -#include <linux/lustre_common.h> -#include <linux/libcfs/libcfs.h> -#include <lustre/lustre_idl.h> +#include "../../include/linux/lustre_compat25.h" +#include "lustre_common.h" +#include "../../../include/linux/libcfs/libcfs.h" +#include "../lustre/lustre_idl.h" # include <linux/types.h> # include <linux/blkdev.h> -# include <lvfs.h> +# include "../lvfs.h" #endif diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 1b7f6a9bf62c..16b3d6887ff6 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -42,9 +42,8 @@ #ifndef _LPROCFS_SNMP_H #define _LPROCFS_SNMP_H -#include <linux/lprocfs_status.h> -#include <lustre/lustre_idl.h> -#include <linux/libcfs/params_tree.h> +#include "linux/lprocfs_status.h" +#include "lustre/lustre_idl.h" struct lprocfs_vars { const char *name; @@ -375,7 +374,7 @@ extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count, int *val, int mult); extern int lprocfs_read_frac_helper(char *buffer, unsigned long count, long val, int mult); -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid); @@ -605,7 +604,7 @@ extern int lprocfs_obd_seq_create(struct obd_device *dev, const char *name, extern int lprocfs_rd_u64(struct seq_file *m, void *data); extern int lprocfs_rd_atomic(struct seq_file *m, void *data); -extern int lprocfs_wr_atomic(struct file *file, const char *buffer, +extern int lprocfs_wr_atomic(struct file *file, const char __user *buffer, unsigned long count, void *data); extern int lprocfs_rd_uint(struct seq_file *m, void *data); extern int lprocfs_wr_uint(struct file *file, const char *buffer, @@ -662,8 +661,8 @@ unsigned long lprocfs_oh_sum(struct obd_histogram *oh); void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx, struct lprocfs_counter *cnt); -extern int lprocfs_single_release(cfs_inode_t *, struct file *); -extern int lprocfs_seq_release(cfs_inode_t *, struct file *); +extern int lprocfs_single_release(struct inode *, struct file *); +extern int lprocfs_seq_release(struct inode *, struct file *); /* You must use these macros when you want to refer to * the import in a client obd_device for a lprocfs entry */ @@ -684,7 +683,7 @@ extern int lprocfs_seq_release(cfs_inode_t *, struct file *); a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally, call lprocfs_obd_seq_create(obd, filename, 0444, &name#_fops, data); */ #define __LPROC_SEQ_FOPS(name, custom_seq_write) \ -static int name##_single_open(cfs_inode_t *inode, struct file *file) \ +static int name##_single_open(struct inode *inode, struct file *file) \ { \ return single_open(file, name##_seq_show, PDE_DATA(inode)); \ } \ @@ -727,7 +726,7 @@ static struct file_operations name##_fops = { \ { \ return lprocfs_wr_##type(file, buffer, count, off); \ } \ - static int name##_##type##_open(cfs_inode_t *inode, struct file *file) \ + static int name##_##type##_open(struct inode *inode, struct file *file) \ { \ return single_open(file, NULL, PDE_DATA(inode)); \ } \ @@ -806,7 +805,7 @@ extern int lprocfs_quota_wr_qs_factor(struct file *file, const char *buffer, unsigned long count, void *data); #else -/* LPROCFS is not defined */ +/* CONFIG_PROC_FS is not defined */ #define proc_lustre_root NULL @@ -1000,6 +999,6 @@ __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx, /* lproc_ptlrpc.c */ #define target_print_req NULL -#endif /* LPROCFS */ +#endif /* CONFIG_PROC_FS */ #endif /* LPROCFS_SNMP_H */ diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index 98149f5da153..d5c368bab5bd 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -38,9 +38,9 @@ #define __LUSTRE_LU_OBJECT_H #include <stdarg.h> -#include <linux/libcfs/libcfs.h> -#include <lustre/lustre_idl.h> -#include <lu_ref.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "lustre/lustre_idl.h" +#include "lu_ref.h" struct seq_file; struct proc_dir_entry; diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index 83014c9fea65..757146273724 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -91,14 +91,11 @@ #ifndef _LUSTRE_IDL_H_ #define _LUSTRE_IDL_H_ -#if !defined(LPU64) -#include <linux/libcfs/libcfs.h> /* for LPUX64, etc */ -#endif +#include "../../../include/linux/libcfs/libcfs.h" /* Defn's shared with user-space. */ -#include <lustre/lustre_user.h> - -#include <lustre/lustre_errno.h> +#include "lustre_user.h" +#include "lustre_errno.h" /* * GENERAL STUFF @@ -302,7 +299,7 @@ static inline int range_compare_loc(const struct lu_seq_range *r1, r1->lsr_flags != r2->lsr_flags; } -#define DRANGE "[%#16.16"LPF64"x-%#16.16"LPF64"x):%x:%s" +#define DRANGE "[%#16.16Lx-%#16.16Lx):%x:%s" #define PRANGE(range) \ (range)->lsr_start, \ @@ -682,14 +679,14 @@ static inline void ostid_set_id(struct ost_id *oi, __u64 oid) { if (fid_seq_is_mdt0(ostid_seq(oi))) { if (oid >= IDIF_MAX_OID) { - CERROR("Bad "LPU64" to set "DOSTID"\n", + CERROR("Bad %llu to set "DOSTID"\n", oid, POSTID(oi)); return; } oi->oi.oi_id = oid; } else { if (oid > OBIF_MAX_OID) { - CERROR("Bad "LPU64" to set "DOSTID"\n", + CERROR("Bad %llu to set "DOSTID"\n", oid, POSTID(oi)); return; } @@ -2748,7 +2745,7 @@ struct ldlm_res_id { __u64 name[RES_NAME_SIZE]; }; -#define DLDLMRES "["LPX64":"LPX64":"LPX64"]."LPX64i +#define DLDLMRES "[%#llx:%#llx:%#llx].%llx" #define PLDLMRES(res) (res)->lr_name.name[0], (res)->lr_name.name[1], \ (res)->lr_name.name[2], (res)->lr_name.name[3] diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 95c754f2075f..a69b27a78042 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -46,8 +46,8 @@ * @{ */ -#include <lustre/ll_fiemap.h> -#include <linux/lustre_user.h> +#include "ll_fiemap.h" +#include "../linux/lustre_user.h" /* for statfs() */ #define LL_SUPER_MAGIC 0x0BD00BD0 @@ -179,7 +179,7 @@ struct ost_id { }; }; -#define DOSTID LPX64":"LPU64 +#define DOSTID "%#llx:%llu" #define POSTID(oi) ostid_seq(oi), ostid_id(oi) /* @@ -475,7 +475,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen) e.g. printf("file FID is "DFID"\n", PFID(fid)); */ #define FID_NOBRACE_LEN 40 #define FID_LEN (FID_NOBRACE_LEN + 2) -#define DFID_NOBRACE LPX64":0x%x:0x%x" +#define DFID_NOBRACE "%#llx:0x%x:0x%x" #define DFID "["DFID_NOBRACE"]" #define PFID(fid) \ (fid)->f_seq, \ @@ -484,11 +484,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen) /* scanf input parse format -- strip '[' first. e.g. sscanf(fidstr, SFID, RFID(&fid)); */ -/* #define SFID "0x"LPX64i":0x"LPSZX":0x"LPSZX"" -liblustreapi.c:2893: warning: format '%lx' expects type 'long unsigned int *', but argument 4 has type 'unsigned int *' -liblustreapi.c:2893: warning: format '%lx' expects type 'long unsigned int *', but argument 5 has type 'unsigned int *' -*/ -#define SFID "0x"LPX64i":0x%x:0x%x" +#define SFID "0x%llx:0x%x:0x%x" #define RFID(fid) \ &((fid)->f_seq), \ &((fid)->f_oid), \ diff --git a/drivers/staging/lustre/lustre/include/lustre_acl.h b/drivers/staging/lustre/lustre/include/lustre_acl.h index 5cfb87b180c3..0b6ea0782229 100644 --- a/drivers/staging/lustre/lustre/include/lustre_acl.h +++ b/drivers/staging/lustre/lustre/include/lustre_acl.h @@ -37,6 +37,6 @@ #ifndef _LUSTRE_ACL_H #define _LUSTRE_ACL_H -#include <linux/lustre_acl.h> +#include "linux/lustre_acl.h" #endif diff --git a/drivers/staging/lustre/lustre/include/lustre_capa.h b/drivers/staging/lustre/lustre/include/lustre_capa.h index d77bffc0b59d..ab6b9ea98a70 100644 --- a/drivers/staging/lustre/lustre/include/lustre_capa.h +++ b/drivers/staging/lustre/lustre/include/lustre_capa.h @@ -50,7 +50,7 @@ * capability */ #include <linux/crypto.h> -#include <lustre/lustre_idl.h> +#include "lustre/lustre_idl.h" #define CAPA_TIMEOUT 1800 /* sec, == 30 min */ #define CAPA_KEY_TIMEOUT (24 * 60 * 60) /* sec, == 1 days */ @@ -82,7 +82,7 @@ struct obd_capa { struct lustre_capa c_capa; /* capa */ atomic_t c_refc; /* ref count */ - cfs_time_t c_expiry; /* jiffies */ + unsigned long c_expiry; /* jiffies */ spinlock_t c_lock; /* protect capa content */ int c_site; @@ -167,7 +167,7 @@ do { \ #define DEBUG_CAPA_KEY(level, k, fmt, args...) \ do { \ -CDEBUG(level, fmt " capability key@%p seq "LPU64" keyid %u\n", \ +CDEBUG(level, fmt " capability key@%p seq %llu keyid %u\n", \ ##args, k, capa_key_seq(k), capa_key_keyid(k)); \ } while (0) @@ -266,20 +266,20 @@ static inline __u64 capa_open_opc(int mode) static inline void set_capa_expiry(struct obd_capa *ocapa) { - cfs_time_t expiry = cfs_time_sub((cfs_time_t)ocapa->c_capa.lc_expiry, - cfs_time_current_sec()); + unsigned long expiry = cfs_time_sub((unsigned long)ocapa->c_capa.lc_expiry, + get_seconds()); ocapa->c_expiry = cfs_time_add(cfs_time_current(), cfs_time_seconds(expiry)); } static inline int capa_is_expired_sec(struct lustre_capa *capa) { - return (capa->lc_expiry - cfs_time_current_sec() <= 0); + return (capa->lc_expiry - get_seconds() <= 0); } static inline int capa_is_expired(struct obd_capa *ocapa) { - return cfs_time_beforeq(ocapa->c_expiry, cfs_time_current()); + return time_before_eq(ocapa->c_expiry, cfs_time_current()); } static inline int capa_opc_supported(struct lustre_capa *capa, __u64 opc) diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h index 3680668a8920..03017fe49d46 100644 --- a/drivers/staging/lustre/lustre/include/lustre_cfg.h +++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h @@ -222,7 +222,7 @@ static inline int lustre_cfg_len(__u32 bufcount, __u32 *buflens) } -#include <obd_support.h> +#include "obd_support.h" static inline struct lustre_cfg *lustre_cfg_new(int cmd, struct lustre_cfg_bufs *bufs) @@ -286,7 +286,7 @@ static inline int lustre_cfg_sanity_check(void *buf, int len) return 0; } -#include <lustre/lustre_user.h> +#include "lustre/lustre_user.h" /** @} cfg */ diff --git a/drivers/staging/lustre/lustre/include/lustre_debug.h b/drivers/staging/lustre/lustre/include/lustre_debug.h index 6146ccb8cce0..6c92d0bc943b 100644 --- a/drivers/staging/lustre/lustre/include/lustre_debug.h +++ b/drivers/staging/lustre/lustre/include/lustre_debug.h @@ -42,8 +42,8 @@ * @{ */ -#include <lustre_net.h> -#include <obd.h> +#include "lustre_net.h" +#include "obd.h" /* lib/debug.c */ void dump_lniobuf(struct niobuf_local *lnb); diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h b/drivers/staging/lustre/lustre/include/lustre_disk.h index ac08164793cb..7f191eed2a81 100644 --- a/drivers/staging/lustre/lustre/include/lustre_disk.h +++ b/drivers/staging/lustre/lustre/include/lustre_disk.h @@ -48,8 +48,8 @@ * @{ */ -#include <linux/libcfs/libcfs.h> -#include <linux/lnet/types.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "../../include/linux/lnet/types.h" #include <linux/backing-dev.h> /****************** on-disk files *********************/ diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 0c6b7841e56d..30b1812f4bf6 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -48,14 +48,14 @@ #ifndef _LUSTRE_DLM_H__ #define _LUSTRE_DLM_H__ -#include <linux/lustre_dlm.h> +#include "linux/lustre_dlm.h" -#include <lustre_lib.h> -#include <lustre_net.h> -#include <lustre_import.h> -#include <lustre_handles.h> -#include <interval_tree.h> /* for interval_node{}, ldlm_extent */ -#include <lu_ref.h> +#include "lustre_lib.h" +#include "lustre_net.h" +#include "lustre_import.h" +#include "lustre_handles.h" +#include "interval_tree.h" /* for interval_node{}, ldlm_extent */ +#include "lu_ref.h" #include "lustre_dlm_flags.h" @@ -441,7 +441,7 @@ struct ldlm_namespace { * \see ldlm_namespace_dump. Increased by 10 seconds every time * it is called. */ - cfs_time_t ns_next_dump; + unsigned long ns_next_dump; /** "policy" function that does actual lock conflict determination */ ldlm_res_policy ns_policy; @@ -783,13 +783,13 @@ struct ldlm_lock { * Seconds. It will be updated if there is any activity related to * the lock, e.g. enqueue the lock or send blocking AST. */ - cfs_time_t l_last_activity; + unsigned long l_last_activity; /** * Time last used by e.g. being matched by lock match. * Jiffies. Should be converted to time if needed. */ - cfs_time_t l_last_used; + unsigned long l_last_used; /** Originally requested extent for the extent lock. */ struct ldlm_extent l_req_extent; @@ -837,7 +837,7 @@ struct ldlm_lock { * under this lock. * \see ost_rw_prolong_locks */ - cfs_time_t l_callback_timeout; + unsigned long l_callback_timeout; /** Local PID of process which created this lock. */ __u32 l_pid; @@ -951,7 +951,7 @@ struct ldlm_resource { void *lr_lvb_data; /** When the resource was considered as contended. */ - cfs_time_t lr_contention_time; + unsigned long lr_contention_time; /** List of references to this resource. For debugging. */ struct lu_ref lr_reference; @@ -1285,7 +1285,7 @@ void ldlm_namespace_register(struct ldlm_namespace *ns, ldlm_side_t client); void ldlm_namespace_unregister(struct ldlm_namespace *ns, ldlm_side_t client); void ldlm_namespace_get(struct ldlm_namespace *ns); void ldlm_namespace_put(struct ldlm_namespace *ns); -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) int ldlm_proc_setup(void); void ldlm_proc_cleanup(void); #else @@ -1390,7 +1390,7 @@ int ldlm_cli_cancel_req(struct obd_export *exp, struct list_head *head, int ldlm_cancel_resource_local(struct ldlm_resource *res, struct list_head *cancels, ldlm_policy_data_t *policy, - ldlm_mode_t mode, int lock_flags, + ldlm_mode_t mode, __u64 lock_flags, ldlm_cancel_flags_t cancel_flags, void *opaque); int ldlm_cli_cancel_list_local(struct list_head *cancels, int count, ldlm_cancel_flags_t flags); diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h index 103f7a8bd83f..e5f8e86cd887 100644 --- a/drivers/staging/lustre/lustre/include/lustre_export.h +++ b/drivers/staging/lustre/lustre/include/lustre_export.h @@ -46,9 +46,9 @@ * @{ */ -#include <lprocfs_status.h> -#include <lustre/lustre_idl.h> -#include <lustre_dlm.h> +#include "lprocfs_status.h" +#include "lustre/lustre_idl.h" +#include "lustre_dlm.h" struct mds_client_data; struct mdt_client_data; @@ -209,7 +209,7 @@ struct obd_export { /** Last committed transno for this export */ __u64 exp_last_committed; /** When was last request received */ - cfs_time_t exp_last_request_time; + unsigned long exp_last_request_time; /** On replay all requests waiting for replay are linked here */ struct list_head exp_req_replay_queue; /** @@ -245,7 +245,7 @@ struct obd_export { enum lustre_sec_part exp_sp_peer; struct sptlrpc_flavor exp_flvr; /* current */ struct sptlrpc_flavor exp_flvr_old[2]; /* about-to-expire */ - cfs_time_t exp_flvr_expire[2]; /* seconds */ + unsigned long exp_flvr_expire[2]; /* seconds */ /** protects exp_hp_rpcs */ spinlock_t exp_rpc_lock; @@ -294,11 +294,11 @@ static inline int exp_connect_multibulk(struct obd_export *exp) return exp_max_brw_size(exp) > ONE_MB_BRW_SIZE; } -static inline int exp_expired(struct obd_export *exp, cfs_duration_t age) +static inline int exp_expired(struct obd_export *exp, long age) { LASSERT(exp->exp_delayed); - return cfs_time_before(cfs_time_add(exp->exp_last_request_time, age), - cfs_time_current_sec()); + return time_before(cfs_time_add(exp->exp_last_request_time, age), + get_seconds()); } static inline int exp_connect_cancelset(struct obd_export *exp) diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h index 5e7b3165a851..ffb00f171240 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fid.h +++ b/drivers/staging/lustre/lustre/include/lustre_fid.h @@ -152,8 +152,8 @@ * Even so, the MDT and OST resources are also in different LDLM namespaces. */ -#include <linux/libcfs/libcfs.h> -#include <lustre/lustre_idl.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "lustre/lustre_idl.h" struct lu_env; struct lu_site; @@ -312,7 +312,7 @@ static inline void lu_last_id_fid(struct lu_fid *fid, __u64 seq) fid->f_seq = fid_idif_seq(0, 0); } else { LASSERTF(fid_seq_is_norm(seq) || fid_seq_is_echo(seq) || - fid_seq_is_idif(seq), LPX64"\n", seq); + fid_seq_is_idif(seq), "%#llx\n", seq); fid->f_seq = seq; } fid->f_oid = 0; diff --git a/drivers/staging/lustre/lustre/include/lustre_fld.h b/drivers/staging/lustre/lustre/include/lustre_fld.h index 550fff587458..ce6330f9bb50 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fld.h +++ b/drivers/staging/lustre/lustre/include/lustre_fld.h @@ -42,8 +42,8 @@ * @{ */ -#include <lustre/lustre_idl.h> -#include <linux/libcfs/libcfs.h> +#include "lustre/lustre_idl.h" +#include "../../include/linux/libcfs/libcfs.h" struct lu_client_fld; struct lu_server_fld; diff --git a/drivers/staging/lustre/lustre/include/lustre_fsfilt.h b/drivers/staging/lustre/lustre/include/lustre_fsfilt.h index 9dcc332cb2f3..9749c3f5568e 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fsfilt.h +++ b/drivers/staging/lustre/lustre/include/lustre_fsfilt.h @@ -41,7 +41,7 @@ #ifndef _LUSTRE_FSFILT_H #define _LUSTRE_FSFILT_H -#include <linux/lustre_fsfilt.h> +#include "../include/linux/lustre_fsfilt.h" #define LU221_BAD_TIME (0x80000000U + 24 * 3600) diff --git a/drivers/staging/lustre/lustre/include/lustre_handles.h b/drivers/staging/lustre/lustre/include/lustre_handles.h index fcd40f33426a..94989c5e361f 100644 --- a/drivers/staging/lustre/lustre/include/lustre_handles.h +++ b/drivers/staging/lustre/lustre/include/lustre_handles.h @@ -42,9 +42,9 @@ * @{ */ -#include <linux/lustre_handles.h> +#include "linux/lustre_handles.h" -#include <linux/libcfs/libcfs.h> +#include "../../include/linux/libcfs/libcfs.h" struct portals_handle_ops { diff --git a/drivers/staging/lustre/lustre/include/lustre_idmap.h b/drivers/staging/lustre/lustre/include/lustre_idmap.h index 2da859691d6a..5624b8bae919 100644 --- a/drivers/staging/lustre/lustre/include/lustre_idmap.h +++ b/drivers/staging/lustre/lustre/include/lustre_idmap.h @@ -47,7 +47,7 @@ * @{ */ -#include <linux/libcfs/libcfs.h> +#include "../../include/linux/libcfs/libcfs.h" #define CFS_NGROUPS_PER_BLOCK ((int)(PAGE_CACHE_SIZE / sizeof(gid_t))) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index 01ed786b40b9..8304a55b92f9 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -47,8 +47,8 @@ * @{ */ -#include <lustre_handles.h> -#include <lustre/lustre_idl.h> +#include "lustre_handles.h" +#include "lustre/lustre_idl.h" /** @@ -200,7 +200,7 @@ struct obd_import { */ struct ptlrpc_sec *imp_sec; struct mutex imp_sec_mutex; - cfs_time_t imp_sec_expire; + unsigned long imp_sec_expire; /** @} */ /** Wait queue for those who need to wait for recovery completion */ @@ -247,7 +247,7 @@ struct obd_import { */ struct lustre_handle imp_remote_handle; /** When to perform next ping. time in jiffies. */ - cfs_time_t imp_next_ping; + unsigned long imp_next_ping; /** When we last successfully connected. time in 64bit jiffies */ __u64 imp_last_success_conn; @@ -350,7 +350,7 @@ static inline void at_reset(struct adaptive_timeout *at, int val) { spin_lock(&at->at_lock); at->at_current = val; at->at_worst_ever = val; - at->at_worst_time = cfs_time_current_sec(); + at->at_worst_time = get_seconds(); spin_unlock(&at->at_lock); } static inline void at_init(struct adaptive_timeout *at, int val, int flags) { diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index 3c26bbdc44b7..de493fabab46 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h @@ -46,20 +46,20 @@ * @{ */ -#include <linux/libcfs/libcfs.h> -#include <lustre/lustre_idl.h> -#include <lustre_ver.h> -#include <lustre_cfg.h> -#include <linux/lustre_lib.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "lustre/lustre_idl.h" +#include "lustre_ver.h" +#include "lustre_cfg.h" +#include "linux/lustre_lib.h" /* target.c */ struct ptlrpc_request; struct obd_export; struct lu_target; struct l_wait_info; -#include <lustre_ha.h> -#include <lustre_net.h> -#include <lvfs.h> +#include "lustre_ha.h" +#include "lustre_net.h" +#include "lvfs.h" int target_pack_pool_reply(struct ptlrpc_request *req); @@ -241,7 +241,7 @@ static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data) } -#include <obd_support.h> +#include "obd_support.h" /* function defined in lustre/obdclass/<platform>/<platform>-module.c */ int obd_ioctl_getdata(char **buf, int *len, void *arg); @@ -459,8 +459,8 @@ static inline int back_to_sleep(void *arg) #define LWI_ON_SIGNAL_NOOP ((void (*)(void *))(-1)) struct l_wait_info { - cfs_duration_t lwi_timeout; - cfs_duration_t lwi_interval; + long lwi_timeout; + long lwi_interval; int lwi_allow_intr; int (*lwi_on_timeout)(void *); void (*lwi_on_signal)(void *); @@ -516,7 +516,7 @@ struct l_wait_info { #define __l_wait_event(wq, condition, info, ret, l_add_wait) \ do { \ wait_queue_t __wait; \ - cfs_duration_t __timeout = info->lwi_timeout; \ + long __timeout = info->lwi_timeout; \ sigset_t __blocked; \ int __allow_intr = info->lwi_allow_intr; \ \ @@ -548,11 +548,11 @@ do { \ if (__timeout == 0) { \ schedule(); \ } else { \ - cfs_duration_t interval = info->lwi_interval? \ - min_t(cfs_duration_t, \ + long interval = info->lwi_interval? \ + min_t(long, \ info->lwi_interval,__timeout):\ __timeout; \ - cfs_duration_t remaining = schedule_timeout(interval);\ + long remaining = schedule_timeout(interval);\ __timeout = cfs_time_sub(__timeout, \ cfs_time_sub(interval, remaining));\ if (__timeout == 0) { \ diff --git a/drivers/staging/lustre/lustre/include/lustre_lite.h b/drivers/staging/lustre/lustre/include/lustre_lite.h index beccb5e4065f..eee900638720 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lite.h +++ b/drivers/staging/lustre/lustre/include/lustre_lite.h @@ -42,19 +42,19 @@ * @{ */ -#include <linux/lustre_lite.h> +#include "linux/lustre_lite.h" -#include <obd_class.h> -#include <obd_ost.h> -#include <lustre_net.h> -#include <lustre_mds.h> -#include <lustre_ha.h> +#include "obd_class.h" +#include "obd_ost.h" +#include "lustre_net.h" +#include "lustre_mds.h" +#include "lustre_ha.h" /* 4UL * 1024 * 1024 */ #define LL_MAX_BLKSIZE_BITS (22) #define LL_MAX_BLKSIZE (1UL<<LL_MAX_BLKSIZE_BITS) -#include <lustre/lustre_user.h> +#include "lustre/lustre_user.h" struct lustre_rw_params { diff --git a/drivers/staging/lustre/lustre/include/lustre_log.h b/drivers/staging/lustre/lustre/include/lustre_log.h index 1a9a9228b795..d02ea24a7e40 100644 --- a/drivers/staging/lustre/lustre/include/lustre_log.h +++ b/drivers/staging/lustre/lustre/include/lustre_log.h @@ -56,12 +56,12 @@ * @{ */ -#include <linux/lustre_log.h> +#include "linux/lustre_log.h" -#include <obd_class.h> -#include <obd_ost.h> -#include <lustre/lustre_idl.h> -#include <dt_object.h> +#include "obd_class.h" +#include "obd_ost.h" +#include "lustre/lustre_idl.h" +#include "dt_object.h" #define LOG_NAME_LIMIT(logname, name) \ snprintf(logname, sizeof(logname), "LOGS/%s", name) diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h index 66765d4d201d..39bbc3634b06 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mdc.h +++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h @@ -50,14 +50,14 @@ #include <linux/fs.h> #include <linux/dcache.h> -#include <linux/lustre_intent.h> -#include <lustre_handles.h> -#include <linux/libcfs/libcfs.h> -#include <obd_class.h> -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <lustre_dlm.h> -#include <lustre_export.h> +#include "linux/lustre_intent.h" +#include "lustre_handles.h" +#include "../../include/linux/libcfs/libcfs.h" +#include "obd_class.h" +#include "lustre/lustre_idl.h" +#include "lustre_lib.h" +#include "lustre_dlm.h" +#include "lustre_export.h" struct ptlrpc_client; struct obd_export; diff --git a/drivers/staging/lustre/lustre/include/lustre_mds.h b/drivers/staging/lustre/lustre/include/lustre_mds.h index b386f87471e3..f0cce41c55c0 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mds.h +++ b/drivers/staging/lustre/lustre/include/lustre_mds.h @@ -47,12 +47,12 @@ * @{ */ -#include <lustre_handles.h> -#include <linux/libcfs/libcfs.h> -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <lustre_dlm.h> -#include <lustre_export.h> +#include "lustre_handles.h" +#include "../../include/linux/libcfs/libcfs.h" +#include "lustre/lustre_idl.h" +#include "lustre_lib.h" +#include "lustre_dlm.h" +#include "lustre_export.h" struct mds_group_info { struct obd_uuid *uuid; diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index f6b7d10cb78c..d6af2ca3acdb 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -55,21 +55,21 @@ * @{ */ -#include <linux/lustre_net.h> +#include "linux/lustre_net.h" -#include <linux/libcfs/libcfs.h> +#include "../../include/linux/libcfs/libcfs.h" // #include <obd.h> -#include <linux/lnet/lnet.h> -#include <lustre/lustre_idl.h> -#include <lustre_ha.h> -#include <lustre_sec.h> -#include <lustre_import.h> -#include <lprocfs_status.h> -#include <lu_object.h> -#include <lustre_req_layout.h> - -#include <obd_support.h> -#include <lustre_ver.h> +#include "../../include/linux/lnet/lnet.h" +#include "lustre/lustre_idl.h" +#include "lustre_ha.h" +#include "lustre_sec.h" +#include "lustre_import.h" +#include "lprocfs_status.h" +#include "lu_object.h" +#include "lustre_req_layout.h" + +#include "obd_support.h" +#include "lustre_ver.h" /* MD flags we _always_ use */ #define PTLRPC_MD_OPTIONS 0 @@ -1591,7 +1591,8 @@ struct ptlrpc_request { rq_replay:1, rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1, rq_no_delay:1, rq_net_err:1, rq_wait_ctx:1, - rq_early:1, rq_must_unlink:1, + rq_early:1, + rq_req_unlink:1, rq_reply_unlink:1, rq_memalloc:1, /* req originated from "kswapd" */ /* server-side flags */ rq_packed_final:1, /* packed final reply */ @@ -1712,9 +1713,9 @@ struct ptlrpc_request { lnet_handle_md_t rq_req_md_h; struct ptlrpc_cb_id rq_req_cbid; /** optional time limit for send attempts */ - cfs_duration_t rq_delay_limit; + long rq_delay_limit; /** time request was first queued */ - cfs_time_t rq_queued_time; + unsigned long rq_queued_time; /* server-side... */ /** request arrival time */ @@ -2355,7 +2356,7 @@ struct ptlrpc_service_part { /** incoming reqs */ struct list_head scp_req_incoming; /** timeout before re-posting reqs, in tick */ - cfs_duration_t scp_rqbd_timeout; + long scp_rqbd_timeout; /** * all threads sleep on this. This wait-queue is signalled when new * incoming request arrives and when difficult reply has to be handled. @@ -2406,7 +2407,7 @@ struct ptlrpc_service_part { /** early reply timer */ struct timer_list scp_at_timer; /** debug */ - cfs_time_t scp_at_checktime; + unsigned long scp_at_checktime; /** check early replies */ unsigned scp_at_check; /** @} */ @@ -2593,7 +2594,7 @@ static inline int ptlrpc_client_bulk_active(struct ptlrpc_request *req) desc = req->rq_bulk; if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) && - req->rq_bulk_deadline > cfs_time_current_sec()) + req->rq_bulk_deadline > get_seconds()) return 1; if (!desc) @@ -3001,7 +3002,7 @@ static inline int ptlrpc_client_early(struct ptlrpc_request *req) { if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > cfs_time_current_sec()) + req->rq_reply_deadline > get_seconds()) return 0; return req->rq_early; } @@ -3013,7 +3014,7 @@ static inline int ptlrpc_client_replied(struct ptlrpc_request *req) { if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > cfs_time_current_sec()) + req->rq_reply_deadline > get_seconds()) return 0; return req->rq_replied; } @@ -3023,7 +3024,7 @@ static inline int ptlrpc_client_recv(struct ptlrpc_request *req) { if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > cfs_time_current_sec()) + req->rq_reply_deadline > get_seconds()) return 1; return req->rq_receiving_reply; } @@ -3035,11 +3036,12 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req) spin_lock(&req->rq_lock); if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > cfs_time_current_sec()) { + req->rq_reply_deadline > get_seconds()) { spin_unlock(&req->rq_lock); return 1; } - rc = req->rq_receiving_reply || req->rq_must_unlink; + rc = req->rq_receiving_reply; + rc = rc || req->rq_req_unlink || req->rq_reply_unlink; spin_unlock(&req->rq_lock); return rc; } @@ -3098,9 +3100,9 @@ static inline int ptlrpc_req_get_repsize(struct ptlrpc_request *req) static inline int ptlrpc_send_limit_expired(struct ptlrpc_request *req) { if (req->rq_delay_limit != 0 && - cfs_time_before(cfs_time_add(req->rq_queued_time, - cfs_time_seconds(req->rq_delay_limit)), - cfs_time_current())) { + time_before(cfs_time_add(req->rq_queued_time, + cfs_time_seconds(req->rq_delay_limit)), + cfs_time_current())) { return 1; } return 0; @@ -3227,7 +3229,7 @@ void ptlrpcd_decref(void); * @{ */ const char* ll_opcode2str(__u32 opcode); -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) void ptlrpc_lprocfs_register_obd(struct obd_device *obd); void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd); void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes); diff --git a/drivers/staging/lustre/lustre/include/lustre_quota.h b/drivers/staging/lustre/lustre/include/lustre_quota.h index 07cb7c310bcc..1ae72e3ff1bf 100644 --- a/drivers/staging/lustre/lustre/include/lustre_quota.h +++ b/drivers/staging/lustre/lustre/include/lustre_quota.h @@ -32,11 +32,11 @@ * */ -#include <linux/lustre_quota.h> +#include "linux/lustre_quota.h" -#include <dt_object.h> -#include <lustre_fid.h> -#include <lustre_dlm.h> +#include "dt_object.h" +#include "lustre_fid.h" +#include "lustre_dlm.h" #ifndef MAX_IQ_TIME #define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h index a83db61a30be..c6457b27c4e7 100644 --- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h +++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h @@ -73,7 +73,7 @@ struct req_capsule { #if !defined(__REQ_LAYOUT_USER__) /* struct ptlrpc_request, lustre_msg* */ -#include <lustre_net.h> +#include "lustre_net.h" void req_capsule_init(struct req_capsule *pill, struct ptlrpc_request *req, enum req_location location); diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h index bf3ee3915c28..dc31bf93a1d7 100644 --- a/drivers/staging/lustre/lustre/include/lustre_sec.h +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h @@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops { /** * Force the \a ctx to die. */ - void (*die) (struct ptlrpc_cli_ctx *ctx, + void (*force_die) (struct ptlrpc_cli_ctx *ctx, int grace); int (*display) (struct ptlrpc_cli_ctx *ctx, char *buf, int bufsize); @@ -510,7 +510,7 @@ struct ptlrpc_cli_ctx { atomic_t cc_refcount; struct ptlrpc_sec *cc_sec; struct ptlrpc_ctx_ops *cc_ops; - cfs_time_t cc_expire; /* in seconds */ + unsigned long cc_expire; /* in seconds */ unsigned int cc_early_expire:1; unsigned long cc_flags; struct vfs_cred cc_vcred; @@ -835,8 +835,8 @@ struct ptlrpc_sec { * garbage collection */ struct list_head ps_gc_list; - cfs_time_t ps_gc_interval; /* in seconds */ - cfs_time_t ps_gc_next; /* in seconds */ + unsigned long ps_gc_interval; /* in seconds */ + unsigned long ps_gc_next; /* in seconds */ }; static inline int sec_is_reverse(struct ptlrpc_sec *sec) @@ -1064,7 +1064,7 @@ const char * sec2target_str(struct ptlrpc_sec *sec); /* * lprocfs */ -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) struct proc_dir_entry; extern struct proc_dir_entry *sptlrpc_proc_root; int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev); diff --git a/drivers/staging/lustre/lustre/include/lvfs.h b/drivers/staging/lustre/lustre/include/lvfs.h index 28f1a6b76f73..32dcd57c47cc 100644 --- a/drivers/staging/lustre/lustre/include/lvfs.h +++ b/drivers/staging/lustre/lustre/include/lvfs.h @@ -41,10 +41,10 @@ #define LL_FID_NAMELEN (16 + 1 + 8 + 1) -#include <linux/libcfs/libcfs.h> -#include <linux/lvfs.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "linux/lvfs.h" -#include <linux/libcfs/lucache.h> +#include "../../include/linux/libcfs/lucache.h" /* lvfs_common.c */ diff --git a/drivers/staging/lustre/lustre/include/md_object.h b/drivers/staging/lustre/lustre/include/md_object.h index ef46b2c461a6..2e5d55030a63 100644 --- a/drivers/staging/lustre/lustre/include/md_object.h +++ b/drivers/staging/lustre/lustre/include/md_object.h @@ -56,7 +56,7 @@ /* * super-class definitions. */ -#include <dt_object.h> +#include "dt_object.h" struct md_device; struct md_device_operations; diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index d5c4613f182d..489bdd399627 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -37,7 +37,7 @@ #ifndef __OBD_H #define __OBD_H -#include <linux/obd.h> +#include "linux/obd.h" #define IOC_OSC_TYPE 'h' #define IOC_OSC_MIN_NR 20 @@ -48,14 +48,13 @@ #define IOC_MDC_MIN_NR 20 #define IOC_MDC_MAX_NR 50 -#include <lustre/lustre_idl.h> -#include <lustre_lib.h> -#include <linux/libcfs/bitmap.h> -#include <lu_ref.h> -#include <lustre_export.h> -#include <lustre_fid.h> -#include <lustre_fld.h> -#include <lustre_capa.h> +#include "lustre/lustre_idl.h" +#include "lustre_lib.h" +#include "lu_ref.h" +#include "lustre_export.h" +#include "lustre_fid.h" +#include "lustre_fld.h" +#include "lustre_capa.h" #define MAX_OBD_DEVICES 8192 @@ -282,7 +281,7 @@ enum llog_ctxt_id { struct timeout_item { enum timeout_event ti_event; - cfs_time_t ti_timeout; + unsigned long ti_timeout; timeout_cb_t ti_cb; void *ti_cb_data; struct list_head ti_obd_list; @@ -338,7 +337,7 @@ struct client_obd { * See osc_{reserve|unreserve}_grant for details. */ long cl_reserved_grant; struct list_head cl_cache_waiters; /* waiting for cache/grant */ - cfs_time_t cl_next_shrink_grant; /* jiffies */ + unsigned long cl_next_shrink_grant; /* jiffies */ struct list_head cl_grant_shrink_list; /* Timeout event list */ int cl_grant_shrink_interval; /* seconds */ diff --git a/drivers/staging/lustre/lustre/include/obd_cksum.h b/drivers/staging/lustre/lustre/include/obd_cksum.h index 5f740f1743ca..662a78062963 100644 --- a/drivers/staging/lustre/lustre/include/obd_cksum.h +++ b/drivers/staging/lustre/lustre/include/obd_cksum.h @@ -34,8 +34,8 @@ #ifndef __OBD_CKSUM #define __OBD_CKSUM -#include <linux/libcfs/libcfs.h> -#include <lustre/lustre_idl.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "lustre/lustre_idl.h" static inline unsigned char cksum_obd2cfs(cksum_type_t cksum_type) { diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index e265820c009f..1d401c9e5e8c 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -37,15 +37,15 @@ #define __CLASS_OBD_H -#include <obd_support.h> -#include <lustre_import.h> -#include <lustre_net.h> -#include <obd.h> -#include <lustre_lib.h> -#include <lustre/lustre_idl.h> -#include <lprocfs_status.h> +#include "obd_support.h" +#include "lustre_import.h" +#include "lustre_net.h" +#include "obd.h" +#include "lustre_lib.h" +#include "lustre/lustre_idl.h" +#include "lprocfs_status.h" -#include <linux/obd_class.h> +#include "linux/obd_class.h" #define OBD_STATFS_NODELAY 0x0001 /* requests should be send without delay * and resends for avoid deadlocks */ @@ -141,7 +141,7 @@ int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg); int class_add_uuid(const char *uuid, __u64 nid); /*obdecho*/ -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) extern void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); #else static inline void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars) @@ -347,7 +347,7 @@ do { \ } while (0) -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) #define OBD_COUNTER_OFFSET(op) \ ((offsetof(struct obd_ops, o_ ## op) - \ offsetof(struct obd_ops, o_iocontrol)) \ @@ -1160,13 +1160,12 @@ static inline int obd_statfs_async(struct obd_export *exp, OBD_CHECK_DT_OP(obd, statfs, -EOPNOTSUPP); OBD_COUNTER_INCREMENT(obd, statfs); - CDEBUG(D_SUPER, "%s: osfs %p age "LPU64", max_age "LPU64"\n", + CDEBUG(D_SUPER, "%s: osfs %p age %llu, max_age %llu\n", obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age); if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { rc = OBP(obd, statfs_async)(exp, oinfo, max_age, rqset); } else { - CDEBUG(D_SUPER,"%s: use %p cache blocks "LPU64"/"LPU64 - " objects "LPU64"/"LPU64"\n", + CDEBUG(D_SUPER,"%s: use %p cache blocks %llu/%llu objects %llu/%llu\n", obd->obd_name, &obd->obd_osfs, obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks, obd->obd_osfs.os_ffree, obd->obd_osfs.os_files); @@ -1217,7 +1216,7 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, OBD_CHECK_DT_OP(obd, statfs, -EOPNOTSUPP); OBD_COUNTER_INCREMENT(obd, statfs); - CDEBUG(D_SUPER, "osfs "LPU64", max_age "LPU64"\n", + CDEBUG(D_SUPER, "osfs %llu, max_age %llu\n", obd->obd_osfs_age, max_age); if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { rc = OBP(obd, statfs)(env, exp, osfs, max_age, flags); @@ -1228,8 +1227,7 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, spin_unlock(&obd->obd_osfs_lock); } } else { - CDEBUG(D_SUPER, "%s: use %p cache blocks "LPU64"/"LPU64 - " objects "LPU64"/"LPU64"\n", + CDEBUG(D_SUPER, "%s: use %p cache blocks %llu/%llu objects %llu/%llu\n", obd->obd_name, &obd->obd_osfs, obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks, obd->obd_osfs.os_ffree, obd->obd_osfs.os_files); @@ -1818,7 +1816,7 @@ static inline int md_enqueue(struct obd_export *exp, struct lustre_handle *lockh, void *lmm, int lmmsize, struct ptlrpc_request **req, - int extra_lock_flags) + __u64 extra_lock_flags) { int rc; diff --git a/drivers/staging/lustre/lustre/include/obd_ost.h b/drivers/staging/lustre/lustre/include/obd_ost.h index af89843c312b..60de42972ec9 100644 --- a/drivers/staging/lustre/lustre/include/obd_ost.h +++ b/drivers/staging/lustre/lustre/include/obd_ost.h @@ -43,7 +43,7 @@ #ifndef _LUSTRE_OST_H #define _LUSTRE_OST_H -#include <obd_class.h> +#include "obd_class.h" struct osc_brw_async_args { struct obdo *aa_oa; @@ -87,6 +87,10 @@ struct osc_enqueue_args { unsigned int oa_agl:1; }; +extern void osc_update_enqueue(struct lustre_handle *lov_lockhp, + struct lov_oinfo *loi, __u64 flags, + struct ost_lvb *lvb, __u32 mode, int rc); + #if 0 int osc_extent_blocking_cb(struct ldlm_lock *lock, struct ldlm_lock_desc *new, void *data, diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index cc5af509b261..92c89925ff67 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -37,11 +37,10 @@ #ifndef _OBD_SUPPORT #define _OBD_SUPPORT -#include <linux/libcfs/libcfs.h> -#include <lvfs.h> -#include <lprocfs_status.h> - -#include <linux/obd_support.h> +#include "../../include/linux/libcfs/libcfs.h" +#include "lvfs.h" +#include "lprocfs_status.h" +#include "linux/obd_support.h" /* global variables */ extern struct lprocfs_stats *obd_memory; @@ -509,7 +508,7 @@ extern atomic_t libcfs_kmemory; extern void obd_update_maxusage(void); -#ifdef LPROCFS +#if defined (CONFIG_PROC_FS) #define obd_memory_add(size) \ lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size)) #define obd_memory_sub(size) \ @@ -663,7 +662,7 @@ do { \ if (unlikely((ptr) == NULL)) { \ CERROR("vmalloc of '" #ptr "' (%d bytes) failed\n", \ (int)(size)); \ - CERROR(LPU64" total bytes allocated by Lustre, %d by LNET\n", \ + CERROR("%llu total bytes allocated by Lustre, %d by LNET\n", \ obd_memory_sum(), atomic_read(&libcfs_kmemory)); \ } else { \ OBD_ALLOC_POST(ptr, size, "vmalloced"); \ @@ -823,11 +822,11 @@ do { \ alloc_page(gfp_mask) : \ alloc_pages_node(cfs_cpt_spread_node(cptab, cpt), gfp_mask, 0);\ if (unlikely((ptr) == NULL)) { \ - CERROR("alloc_pages of '" #ptr "' %d page(s) / "LPU64" bytes "\ + CERROR("alloc_pages of '" #ptr "' %d page(s) / %llu bytes "\ "failed\n", (int)1, \ (__u64)(1 << PAGE_CACHE_SHIFT)); \ - CERROR(LPU64" total bytes and "LPU64" total pages " \ - "("LPU64" bytes) allocated by Lustre, " \ + CERROR("%llu total bytes and %llu total pages " \ + "(%llu bytes) allocated by Lustre, " \ "%d total bytes by LNET\n", \ obd_memory_sum(), \ obd_pages_sum() << PAGE_CACHE_SHIFT, \ @@ -836,7 +835,7 @@ do { \ } else { \ obd_pages_add(0); \ CDEBUG(D_MALLOC, "alloc_pages '" #ptr "': %d page(s) / " \ - LPU64" bytes at %p.\n", \ + "%llu bytes at %p.\n", \ (int)1, \ (__u64)(1 << PAGE_CACHE_SHIFT), ptr); \ } \ @@ -851,7 +850,7 @@ do { \ do { \ LASSERT(ptr); \ obd_pages_sub(0); \ - CDEBUG(D_MALLOC, "free_pages '" #ptr "': %d page(s) / "LPU64" bytes " \ + CDEBUG(D_MALLOC, "free_pages '" #ptr "': %d page(s) / %llu bytes " \ "at %p.\n", \ (int)1, (__u64)(1 << PAGE_CACHE_SHIFT), \ ptr); \ |