staging/lustre: minor cleanups and CONFIG_PROC_FS fix up
cover staging/lustre: minor cleanups and CONFIG_PROC_FS fix up
Hi Greg,
Patch 1-7 are small cleanup and fixup.
Patch 8 and 9 fix build errors when CONFIG_PROC_FS is off.
Thanks,
Tao
Peng Tao (9):
staging/lustre/obdclass: fix false used uninitialized warning staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined staging/lustre/ldlm: inline ldlm_proc_setup staging/lustre/obdclass: move obd_sysctl_init out of class_procfs_init staging/lustre: fix defined not used warning staging/lustre/llite: fix used uninitialized warning staging/lustre/llite: remove ll_file_get_iov_count staging/lustre: fix undefined reference if CONFIG_PROC_FS is off staging/lustre: don't compile procfs code when CONFIG_PROC_FS is off
drivers/staging/lustre/lnet/lnet/router_proc.c | 4 - drivers/staging/lustre/lustre/fid/Makefile | 3 +- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 - drivers/staging/lustre/lustre/fld/Makefile | 3 +- drivers/staging/lustre/lustre/fld/fld_internal.h | 1 - drivers/staging/lustre/lustre/fld/fld_request.c | 2 +- drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 - .../staging/lustre/lustre/include/lprocfs_status.h | 8 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 3 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 17 +- .../staging/lustre/lustre/include/obd_support.h | 3 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 - drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 9 + .../lustre/lustre/libcfs/linux/linux-proc.c | 8 - drivers/staging/lustre/lustre/llite/Makefile | 3 +- drivers/staging/lustre/lustre/llite/file.c | 40 +-- .../staging/lustre/lustre/llite/llite_internal.h | 14 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + drivers/staging/lustre/lustre/llite/lproc_llite.c | 4 - drivers/staging/lustre/lustre/lmv/Makefile | 4 +- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 5 - drivers/staging/lustre/lustre/lov/Makefile | 3 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 2 +- drivers/staging/lustre/lustre/lov/lproc_lov.c | 4 +- drivers/staging/lustre/lustre/lvfs/Makefile | 3 +- drivers/staging/lustre/lustre/lvfs/lvfs_lib.c | 2 - drivers/staging/lustre/lustre/mdc/Makefile | 3 +- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 3 - drivers/staging/lustre/lustre/mgc/Makefile | 3 +- drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 3 - drivers/staging/lustre/lustre/mgc/mgc_internal.h | 2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 + drivers/staging/lustre/lustre/obdclass/class_obd.c | 20 +- drivers/staging/lustre/lustre/obdclass/genops.c | 3 +- .../lustre/lustre/obdclass/linux/linux-module.c | 5 +- drivers/staging/lustre/lustre/obdclass/llog_test.c | 6 +- .../lustre/lustre/obdclass/lprocfs_status.c | 348 ++++++++++---------- drivers/staging/lustre/lustre/osc/Makefile | 3 +- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 - drivers/staging/lustre/lustre/ptlrpc/Makefile | 3 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 6 + 41 files changed, 273 insertions(+), 292 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/9 staging/lustre/obdclass: fix false used uninitialized warning
Got below warning when building lustre with 4.7.3. drivers/staging/lustre/lustre/obdclass/llog_test.c: In function ‘ llog_test_init’:drivers/staging/lustre/lustre/obdclass/llog_test.c:1058:28: warning: ‘ lvars.module_vars’ is used uninitialized in this function [-Wuninitialized]
--- drivers/staging/lustre/lustre/obdclass/llog_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/llog_test.c +1 -1
@@ -1048,7 +1048,7 @@ static struct obd_ops llog_obd_ops = {static int __init llog_test_init (void ) { -struct lprocfs_static_vars lvars; +struct lprocfs_static_vars uninitialized_var (lvars );lprocfs_llog_test_init_vars (&lvars); return class_register_type(&llog_obd_ops, NULL,
Signature · 1 line
1.7.9.5
PATCH 2/9 staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined
In reply to Peng TaoNo need to surround them with #ifdef LPROCFS.
--- drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/genops.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/obdclass/class_obd.c +2 -2
@@ -516,7 +516,7 @@ static int __init init_obdclass(void)spin_lock_init (&obd_types_lock);obd_zombie_impexp_init (); -#ifdef LPROCFS + obd_memory =lprocfs_alloc_stats (OBD_STATS_NUM ,LPROCFS_STATS_FLAG_NONE |LPROCFS_STATS_FLAG_IRQ_SAFE );
@@ -531,7 +531,7 @@ static int __init init_obdclass(void)lprocfs_counter_init (obd_memory,OBD_MEMORY_PAGES_STAT ,LPROCFS_CNTR_AVGMINMAX ,"pagesused" ,"pages" ); -#endif + err =obd_init_checks ();if (err == -EOVERFLOW )return err;
drivers/staging/lustre/lustre/obdclass/genops.c +1 -2
@@ -193,7 +193,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,strcpy (type->typ_name, name);spin_lock_init (&type->obd_type_lock); -#ifdef LPROCFS type->typ_procroot =lprocfs_register (type->typ_name, proc_lustre_root, vars, type);if (IS_ERR (type->typ_procroot)) {
@@ -201,7 +200,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, type->typ_procroot =NULL ;GOTO (failed, rc); } -#endif +if (ldt !=NULL ) { type->typ_lu = ldt; rc =lu_device_type_init (ldt);
Signature · 1 line
1.7.9.5
PATCH 4/9 staging/lustre/obdclass: move obd_sysctl_init out of class_procfs_init
In reply to Peng TaoIt is not strictly related to procfs. Besides, we already call obd_sysctl_clean outside of class_procfs_clean.
--- drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 +++ .../lustre/lustre/obdclass/linux/linux-module.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/class_obd.c +3 -0
@@ -564,6 +564,9 @@ static int __init init_obdclass(void) err =obd_init_caches ();if (err)return err; + +obd_sysctl_init (); + err =class_procfs_init ();if (err)return err;
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +0 -1
@@ -380,7 +380,6 @@ int class_procfs_init(void) {int rc =0 ; -obd_sysctl_init (); proc_lustre_root =lprocfs_register ("fs/lustre" ,NULL , lprocfs_base,NULL );if (IS_ERR (proc_lustre_root)) {
Signature · 1 line
1.7.9.5
PATCH 4/9 staging/lustre/obdclass: move obd_sysctl_init out of class_procfs_init
In reply to Peng TaoIt is not strictly related to procfs. Besides, we already call obd_sysctl_clean outside of class_procfs_clean.
--- drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 +++ .../lustre/lustre/obdclass/linux/linux-module.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/class_obd.c +3 -0
@@ -564,6 +564,9 @@ static int __init init_obdclass(void) err =obd_init_caches ();if (err)return err; + +obd_sysctl_init (); + err =class_procfs_init ();if (err)return err;
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +0 -1
@@ -380,7 +380,6 @@ int class_procfs_init(void) {int rc =0 ; -obd_sysctl_init (); proc_lustre_root =lprocfs_register ("fs/lustre" ,NULL , lprocfs_base,NULL );if (IS_ERR (proc_lustre_root)) {
Signature · 1 line
1.7.9.5
PATCH 6/9 staging/lustre/llite: fix used uninitialized warning
In reply to Peng TaoGot below warning when building with sparc:drivers/staging/lustre/lustre/llite/file.c: In function 'll_file_aio_write':drivers/staging/lustre/lustre/llite/file.c:1247:9: warning: 'count' may be used uninitialized in this function [-Wuninitialized] drivers/staging/lustre/lustre/llite/file.c: In function 'll_file_aio_read':drivers/staging/lustre/lustre/llite/file.c:1188:9: warning: 'count' may be used uninitialized in this function [-Wuninitialized]
--- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +2 -2
@@ -1185,7 +1185,7 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov, {struct lu_env *env;struct vvp_io_args *args; -size_t count; +size_t count =0 ;ssize_t result;int refcheck;
@@ -1244,7 +1244,7 @@ static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov, {struct lu_env *env;struct vvp_io_args *args; -size_t count; +size_t count =0 ;ssize_t result;int refcheck;
Signature · 1 line
1.7.9.5
PATCH 7/9 staging/lustre/llite: remove ll_file_get_iov_count
In reply to Peng TaoIt exactly copies generic_segment_checks() except wrongly calling access_ok(VERIFY_READ) for aio read range. Drop it and just call generic_segment_checks() instead.
--- drivers/staging/lustre/lustre/llite/file.c | 36 ++-------------------------- 1 file changed, 2 insertions(+), 34 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +2 -34
@@ -1148,38 +1148,6 @@ out:return result; } - -/* -* XXX: exact copy from kernel code (__generic_file_aio_write_nolock) -*/ -static int ll_file_get_iov_count (const struct iovec *iov, -unsigned long *nr_segs,size_t *count) -{ -size_t cnt =0 ; -unsigned long seg; - -for (seg =0 ; seg < *nr_segs; seg++) { -const struct iovec *iv = &iov[seg]; - -/* -* If any segment has a negative length, or the cumulative -* length ever wraps negative then return -EINVAL. -*/ - cnt += iv->iov_len; -if (unlikely ((ssize_t )(cnt|iv->iov_len) <0 )) -return -EINVAL ; -if (access_ok (VERIFY_READ , iv->iov_base, iv->iov_len)) -continue ; -if (seg ==0 ) -return -EFAULT ; - *nr_segs = seg; - cnt -= iv->iov_len;/* This segment is no good */ -break ; - } - *count = cnt; -return 0 ; -} -static ssize_t ll_file_aio_read (struct kiocb *iocb,const struct iovec *iov,unsigned long nr_segs,loff_t pos) {
@@ -1189,7 +1157,7 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov,ssize_t result;int refcheck; - result =ll_file_get_iov_count (iov, &nr_segs, &count); + result =generic_segment_checks (iov, &nr_segs, &ocount,VERIFY_WRITE );if (result)return result;
@@ -1248,7 +1216,7 @@ static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov,ssize_t result;int refcheck; - result =ll_file_get_iov_count (iov, &nr_segs, &count); + result =generic_segment_checks (iov, &nr_segs, &ocount,VERIFY_READ );if (result)return result;
Signature · 1 line
1.7.9.5
PATCH 8/9 staging/lustre: fix undefined reference if CONFIG_PROC_FS is off
In reply to Peng TaoWhen building Lustre with CONFIG_PROC_FS off, we'll get many errors like:
drivers/staging/lustre/lustre/obdclass/llog_test.c:1053: error: implicit declaration of function ‘lprocfs_llog_test_init_vars’ make[3]: *** [drivers/staging/lustre/lustre/obdclass/llog_test.o] Error 1
make[2]: *** [drivers/staging/lustre/lustre/obdclass] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.odrivers/staging/lustre/lustre/ptlrpc/pinger.c: In function ‘ptlrpc_pinger_main’:drivers/staging/lustre/lustre/ptlrpc/pinger.c:331: error: implicit declaration of function ‘obd_update_maxusage’
The patch defines following symbols when CONFIG_PROC_FS is off:fld_type_proc_dir, obd_update_maxusage(), obd_max_pages, obd_max_alloc, obd_alloc, obd_pages, lprocfs_llog_test_init_vars().
--- drivers/staging/lustre/lustre/fld/fld_internal.h | 1 - drivers/staging/lustre/lustre/fld/fld_request.c | 2 +- .../staging/lustre/lustre/include/obd_support.h | 3 ++- drivers/staging/lustre/lustre/obdclass/class_obd.c | 6 ++++++ drivers/staging/lustre/lustre/obdclass/llog_test.c | 4 ++++ 5 files changed, 13 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/fld/fld_internal.h +0 -1
@@ -190,5 +190,4 @@ fld_target_name(struct lu_fld_target *tar) return (const char *)tar->ft_exp->exp_obd->obd_name; } -extern struct proc_dir_entry *fld_type_proc_dir;#endif /* __FLD_INTERNAL_H */
drivers/staging/lustre/lustre/fld/fld_request.c +1 -1
@@ -274,9 +274,9 @@ int fld_client_del_target(struct lu_client_fld *fld, __u64 idx) }EXPORT_SYMBOL (fld_client_del_target); -#ifdef LPROCFS struct proc_dir_entry *fld_type_proc_dir =NULL ; +#ifdef LPROCFS static int fld_client_proc_init (struct lu_client_fld *fld) {int rc;
drivers/staging/lustre/lustre/include/obd_support.h +2 -1
@@ -507,6 +507,8 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,extern atomic_t libcfs_kmemory; +extern void obd_update_maxusage (void ); +#ifdef LPROCFS #define obd_memory_add (size) \ lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size))
@@ -525,7 +527,6 @@ extern atomic_t libcfs_kmemory;lprocfs_stats_collector (obd_memory,OBD_MEMORY_PAGES_STAT , \ LPROCFS_FIELDS_FLAGS_SUM) -extern void obd_update_maxusage (void );extern __u64 obd_memory_max (void );extern __u64 obd_pages_max (void );
drivers/staging/lustre/lustre/obdclass/class_obd.c +6 -0
@@ -54,7 +54,13 @@ struct list_head obd_types;DEFINE_RWLOCK (obd_dev_lock);__u64 obd_max_pages =0 ; +EXPORT_SYMBOL (obd_max_pages);__u64 obd_max_alloc =0 ; +EXPORT_SYMBOL (obd_max_alloc); +__u64 obd_alloc; +EXPORT_SYMBOL (obd_alloc); +__u64 obd_pages; +EXPORT_SYMBOL (obd_pages);DEFINE_SPINLOCK (obd_updatemax_lock);/* The following are visible and mutable through /proc/sys/lustre/. */
drivers/staging/lustre/lustre/obdclass/llog_test.c +4 -0
@@ -947,6 +947,10 @@ static void lprocfs_llog_test_init_vars(struct lprocfs_static_vars *lvars) lvars->module_vars = lprocfs_llog_test_module_vars; lvars->obd_vars = lprocfs_llog_test_obd_vars; } +#else +static void lprocfs_llog_test_init_vars (struct lprocfs_static_vars *lvars) +{ +}#endif static int llog_test_cleanup (struct obd_device *obd)
Signature · 1 line
1.7.9.5
PATCH 9/9 staging/lustre: don't compile procfs code when CONFIG_PROC_FS is off
In reply to Peng TaoThe patch changes to conditionally compile procfs related source files. This includes lproc_fid.c, lproc_fld.c, lproc_lov.c, lvfs_lib.c, lproc_mdc.c, lproc_mgc.c, lprocfs_status.c, lproc_osc.c and sec_lproc.c.
There is a checkpatch warning about usage of simple_strtoul() in the patch. But it needs to be fixed in a separate patch because it is not related to CONFIG_PROC_FS breakage here.
--- drivers/staging/lustre/lustre/fid/Makefile | 3 +- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 - drivers/staging/lustre/lustre/fld/Makefile | 3 +- drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 - .../staging/lustre/lustre/include/lprocfs_status.h | 8 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 9 + drivers/staging/lustre/lustre/llite/Makefile | 3 +- .../staging/lustre/lustre/llite/llite_internal.h | 14 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + drivers/staging/lustre/lustre/llite/lproc_llite.c | 4 - drivers/staging/lustre/lustre/lmv/Makefile | 4 +- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 5 - drivers/staging/lustre/lustre/lov/Makefile | 3 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 2 +- drivers/staging/lustre/lustre/lov/lproc_lov.c | 4 +- drivers/staging/lustre/lustre/lvfs/Makefile | 3 +- drivers/staging/lustre/lustre/lvfs/lvfs_lib.c | 2 - drivers/staging/lustre/lustre/mdc/Makefile | 3 +- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 3 - drivers/staging/lustre/lustre/mgc/Makefile | 3 +- drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 3 - drivers/staging/lustre/lustre/mgc/mgc_internal.h | 2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 + drivers/staging/lustre/lustre/obdclass/class_obd.c | 7 + .../lustre/lustre/obdclass/linux/linux-module.c | 4 +- .../lustre/lustre/obdclass/lprocfs_status.c | 348 ++++++++++---------- drivers/staging/lustre/lustre/osc/Makefile | 3 +- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 - drivers/staging/lustre/lustre/ptlrpc/Makefile | 3 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 6 + 31 files changed, 247 insertions(+), 232 deletions(-)
drivers/staging/lustre/lustre/fid/Makefile +2 -1
@@ -1,5 +1,6 @@ obj-$(CONFIG_LUSTRE_FS) += fid.o -fid-y := fid_request.o lproc_fid.o fid_lib.o +fid-y := fid_request.o fid_lib.o +fid-$(CONFIG_PROC_FS) += lproc_fid.o ccflags-y := -I$(src)/../include
drivers/staging/lustre/lustre/fid/lproc_fid.c +0 -2
@@ -54,7 +54,6 @@#include <lustre_fid.h> #include "fid_internal.h" -#ifdef LPROCFS /* * Note: this function is only used for testing, it is no safe for production * use.
@@ -209,4 +208,3 @@ struct lprocfs_vars seq_client_proc_list[] = { { "fid", &lprocfs_fid_fid_fops }, { NULL } }; -#endif
drivers/staging/lustre/lustre/fld/Makefile +2 -1
@@ -1,5 +1,6 @@ obj-$(CONFIG_LUSTRE_FS) += fld.o -fld-y := fld_request.o fld_cache.o lproc_fld.o +fld-y := fld_request.o fld_cache.o +fld-$(CONFIG_PROC_FS) += lproc_fld.o ccflags-y := -I$(src)/../include
drivers/staging/lustre/lustre/fld/lproc_fld.c +0 -3
@@ -56,7 +56,6 @@#include <lustre_fid.h> #include "fld_internal.h" -#ifdef LPROCFS static int fld_proc_targets_seq_show (struct seq_file *m,void *unused) {
@@ -162,5 +161,3 @@ struct lprocfs_vars fld_client_proc_list[] = { { "hash", &fld_proc_hash_fops }, { "cache_flush", &fld_proc_cache_flush_fops }, { NULL }}; - -#endif /* LPROCFS */
drivers/staging/lustre/lustre/include/lprocfs_status.h +4 -4
@@ -370,6 +370,10 @@ static inline void s2dhms(struct dhms *ts, time_t secs)#define JOBSTATS_DISABLE "disable"#define JOBSTATS_PROCNAME_UID "procname_uid" +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 extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats,
@@ -641,11 +645,7 @@ extern int lprocfs_rd_filesfree(struct seq_file *m, void *data);extern int lprocfs_write_helper (const char *buffer,unsigned long count,int *val); -extern int lprocfs_write_frac_helper (const char *buffer,unsigned long count, -int *val,int mult);extern int lprocfs_seq_read_frac_helper (struct seq_file *m,long val,int mult); -extern int lprocfs_read_frac_helper (char *buffer,unsigned long count, -long val,int mult);extern int lprocfs_write_u64_helper (const char *buffer,unsigned long count,__u64 *val); extern int lprocfs_write_frac_u64_helper(const char *buffer,
drivers/staging/lustre/lustre/include/lustre_sec.h +11 -6
@@ -903,12 +903,6 @@ struct ptlrpc_bulk_sec_desc {/* -* lprocfs -*/ -struct proc_dir_entry ; -extern struct proc_dir_entry *sptlrpc_proc_root; - -/* * round size up to next power of 2, for slab allocation. * @size must be sane (can't overflow after round up) */
@@ -1067,7 +1061,18 @@ void sptlrpc_gc_add_ctx(struct ptlrpc_cli_ctx *ctx);/* misc */ const char *sec2target_str (struct ptlrpc_sec *sec); +/* +* lprocfs +*/ +#ifdef LPROCFS +struct proc_dir_entry ; +extern struct proc_dir_entry *sptlrpc_proc_root;int sptlrpc_lprocfs_cliobd_attach (struct obd_device *dev); +#else +#define sptlrpc_proc_root NULL +static inline int sptlrpc_lprocfs_cliobd_attach (struct obd_device *dev) +{return 0 ; } +#endif /* * server side
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +9 -0
@@ -638,6 +638,7 @@ int ldlm_pool_setup(struct ldlm_pool *pl, int limit) }EXPORT_SYMBOL (ldlm_pool_setup); +#ifdef LPROCFS static int lprocfs_pool_state_seq_show (struct seq_file *m,void *unused) {int granted, grant_rate, cancel_rate, grant_step;
@@ -822,6 +823,14 @@ static void ldlm_pool_proc_fini(struct ldlm_pool *pl) pl->pl_proc_dir = NULL; } } +#else /* !LPROCFS */ +static int ldlm_pool_proc_init (struct ldlm_pool *pl) +{ +return 0 ; +} + +static void ldlm_pool_proc_fini (struct ldlm_pool *pl) {} +#endif /* LPROCFS */ int ldlm_pool_init (struct ldlm_pool *pl,struct ldlm_namespace *ns,int idx,ldlm_side_t client)
drivers/staging/lustre/lustre/llite/Makefile +2 -1
@@ -1,12 +1,13 @@ obj-$(CONFIG_LUSTRE_FS) += lustre.o obj-$(CONFIG_LUSTRE_LLITE_LLOOP) += llite_lloop.o lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ - rw.o lproc_llite.o namei.o symlink.o llite_mmap.o \ + rw.o namei.o symlink.o llite_mmap.o \ xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o llite_capa.o \ rw26.o super25.o statahead.o \ ../lclient/glimpse.o ../lclient/lcommon_cl.o ../lclient/lcommon_misc.o \ vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o +lustre-$(CONFIG_PROC_FS) += lproc_llite.o llite_lloop-y := lloop.o
drivers/staging/lustre/lustre/llite/llite_internal.h +9 -5
@@ -701,15 +701,22 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent,void lprocfs_unregister_mountpoint (struct ll_sb_info *sbi);void ll_stats_ops_tally (struct ll_sb_info *sbi,int op,int count);void lprocfs_llite_init_vars (struct lprocfs_static_vars *lvars); +void ll_rw_stats_tally (struct ll_sb_info *sbi,pid_t pid, +struct ll_file_data *file,loff_t pos, +size_t count,int rw);#else static inline int lprocfs_register_mountpoint (struct proc_dir_entry *parent,struct super_block *sb,char *osc,char *mdc){return 0 ;}static inline void lprocfs_unregister_mountpoint (struct ll_sb_info *sbi) {} -static void ll_stats_ops_tally (struct ll_sb_info *sbi,int op,int count) {} -static void lprocfs_llite_init_vars (struct lprocfs_static_vars *lvars) +static inline +void ll_stats_ops_tally (struct ll_sb_info *sbi,int op,int count) {} +static inline void lprocfs_llite_init_vars (struct lprocfs_static_vars *lvars) {memset (lvars,0 ,sizeof (*lvars)); } +static inline void ll_rw_stats_tally (struct ll_sb_info *sbi,pid_t pid, +struct ll_file_data *file,loff_t pos, +size_t count,int rw) {}#endif
@@ -785,9 +792,6 @@ int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data, struct md_open_data **mod);void ll_pack_inode2opdata (struct inode *inode,struct md_op_data *op_data,struct lustre_handle *fh); -extern void ll_rw_stats_tally (struct ll_sb_info *sbi,pid_t pid, -struct ll_file_data *file,loff_t pos, -size_t count,int rw);int ll_getattr_it (struct vfsmount *mnt,struct dentry *de,struct lookup_intent *it,struct kstat *stat);int ll_getattr (struct vfsmount *mnt,struct dentry *de,struct kstat *stat);
drivers/staging/lustre/lustre/llite/llite_lib.c +1 -0
@@ -56,6 +56,7 @@#include "llite_internal.h" struct kmem_cache *ll_file_data_slab; +struct proc_dir_entry *proc_lustre_fs_root;LIST_HEAD (ll_super_blocks);DEFINE_SPINLOCK (ll_sb_lock);
drivers/staging/lustre/lustre/llite/lproc_llite.c +0 -4
@@ -42,9 +42,6 @@#include "llite_internal.h" -struct proc_dir_entry *proc_lustre_fs_root; - -#ifdef LPROCFS /* /proc/lustre/llite mount point registration */ extern struct file_operations vvp_dump_pgcache_file_ops;struct file_operations ll_rw_extents_stats_fops;
@@ -1404,4 +1401,3 @@ void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars) lvars->module_vars =NULL ; lvars->obd_vars = lprocfs_llite_obd_vars; } -#endif /* LPROCFS */
drivers/staging/lustre/lustre/lmv/Makefile +2 -2
@@ -1,5 +1,5 @@ obj-$(CONFIG_LUSTRE_FS) += lmv.o -lmv-y := lmv_obd.o lmv_intent.o lmv_fld.o lproc_lmv.o - +lmv-y := lmv_obd.o lmv_intent.o lmv_fld.o +lmv-$(CONFIG_PROC_FS) += lproc_lmv.o ccflags-y := -I$(src)/../include
drivers/staging/lustre/lustre/lmv/lproc_lmv.c +0 -5
@@ -41,10 +41,6 @@#include <lprocfs_status.h> #include <obd_class.h> -#ifndef LPROCFS -static struct lprocfs_vars lprocfs_module_vars[] = { {0 } }; -static struct lprocfs_vars lprocfs_obd_vars[] = { {0 } }; -#else static int lmv_numobd_seq_show (struct seq_file *m,void *v) {struct obd_device *dev = (struct obd_device *)m->private;
@@ -226,7 +222,6 @@ struct file_operations lmv_proc_target_fops = { .release = seq_release, }; -#endif /* LPROCFS */ void lprocfs_lmv_init_vars (struct lprocfs_static_vars *lvars) { lvars->module_vars = lprocfs_lmv_module_vars;
drivers/staging/lustre/lustre/lov/Makefile +2 -1
@@ -1,8 +1,9 @@ obj-$(CONFIG_LUSTRE_FS) += lov.o -lov-y := lov_log.o lov_obd.o lov_pack.o lproc_lov.o lov_offset.o lov_merge.o \ +lov-y := lov_log.o lov_obd.o lov_pack.o lov_offset.o lov_merge.o \ lov_request.o lov_ea.o lov_dev.o lov_object.o lov_page.o \ lov_lock.o lov_io.o lovsub_dev.o lovsub_object.o lovsub_page.o \ lovsub_lock.o lovsub_io.o lov_pool.o +lov-$(CONFIG_PROC_FS) += lproc_lov.o
drivers/staging/lustre/lustre/lov/lov_internal.h +1 -1
@@ -283,8 +283,8 @@ void lsm_free_plain(struct lov_stripe_md *lsm);int lovea_destroy_object (struct lov_obd *lov,struct lov_stripe_md *lsm,struct obdo *oa,void *data);/* lproc_lov.c */ -extern struct file_operations lov_proc_target_fops;#ifdef LPROCFS +extern const struct file_operations lov_proc_target_fops;void lprocfs_lov_init_vars (struct lprocfs_static_vars *lvars);#else static inline void lprocfs_lov_init_vars (struct lprocfs_static_vars *lvars)
drivers/staging/lustre/lustre/lov/lproc_lov.c +1 -3
@@ -41,7 +41,6 @@#include <linux/seq_file.h> #include "lov_internal.h" -#ifdef LPROCFS static int lov_stripesize_seq_show (struct seq_file *m,void *v) {struct obd_device *dev = (struct obd_device *)m->private;
@@ -291,11 +290,10 @@ void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars) lvars->obd_vars = lprocfs_lov_obd_vars; } -struct file_operations lov_proc_target_fops = { +const struct file_operations lov_proc_target_fops = { .owner =THIS_MODULE , .open = lov_target_seq_open, .read = seq_read, .llseek = seq_lseek, .release = lprocfs_seq_release, }; -#endif /* LPROCFS */
drivers/staging/lustre/lustre/lvfs/Makefile +2 -1
@@ -1,6 +1,7 @@ obj-$(CONFIG_LUSTRE_FS) += lvfs.o -lvfs-y := lvfs_linux.o fsfilt.o lvfs_lib.o +lvfs-y := lvfs_linux.o fsfilt.o +lvfs-$(CONFIG_PROC_FS) += lvfs_lib.o ccflags-y := -I$(src)/../include
drivers/staging/lustre/lustre/lvfs/lvfs_lib.c +0 -2
@@ -43,7 +43,6 @@#include <lustre_lib.h> #include <lprocfs_status.h> -#ifdef LPROCFS void lprocfs_counter_add (struct lprocfs_stats *stats,int idx,long amount) {struct lprocfs_counter *percpu_cntr;
@@ -169,4 +168,3 @@ int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid)return rc; }EXPORT_SYMBOL (lprocfs_stats_alloc_one); -#endif /* LPROCFS */
drivers/staging/lustre/lustre/mdc/Makefile +2 -1
@@ -1,5 +1,6 @@ obj-$(CONFIG_LUSTRE_FS) += mdc.o -mdc-y := mdc_request.o mdc_reint.o lproc_mdc.o mdc_lib.o mdc_locks.o +mdc-y := mdc_request.o mdc_reint.o mdc_lib.o mdc_locks.o +mdc-$(CONFIG_PROC_FS) += lproc_mdc.o ccflags-y := -I$(src)/../include
drivers/staging/lustre/lustre/mdc/lproc_mdc.c +0 -3
@@ -39,8 +39,6 @@#include <obd_class.h> #include <lprocfs_status.h> -#ifdef LPROCFS -static int mdc_max_rpcs_in_flight_seq_show (struct seq_file *m,void *v) {struct obd_device *dev = m->private;
@@ -214,4 +212,3 @@ void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars) lvars->module_vars = lprocfs_mdc_module_vars; lvars->obd_vars = lprocfs_mdc_obd_vars; } -#endif /* LPROCFS */
drivers/staging/lustre/lustre/mgc/Makefile +2 -1
@@ -1,5 +1,6 @@ obj-$(CONFIG_LUSTRE_FS) += mgc.o -mgc-y := mgc_request.o lproc_mgc.o +mgc-y := mgc_request.o +mgc-$(CONFIG_PROC_FS) += lproc_mgc.o ccflags-y := -I$(src)/../include
drivers/staging/lustre/lustre/mgc/lproc_mgc.c +0 -3
@@ -40,8 +40,6 @@#include <lprocfs_status.h> #include "mgc_internal.h" -#ifdef LPROCFS -LPROC_SEQ_FOPS_RO_TYPE (mgc, uuid);LPROC_SEQ_FOPS_RO_TYPE (mgc, connect_flags);LPROC_SEQ_FOPS_RO_TYPE (mgc, server_uuid);
@@ -80,4 +78,3 @@ void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars) lvars->module_vars = lprocfs_mgc_module_vars; lvars->obd_vars = lprocfs_mgc_obd_vars; } -#endif /* LPROCFS */
drivers/staging/lustre/lustre/mgc/mgc_internal.h +1 -1
@@ -48,7 +48,7 @@void lprocfs_mgc_init_vars (struct lprocfs_static_vars *lvars);int lprocfs_mgc_rd_ir_state (struct seq_file *m,void *data);#else -static void lprocfs_mgc_init_vars (struct lprocfs_static_vars *lvars) +static inline void lprocfs_mgc_init_vars (struct lprocfs_static_vars *lvars) {memset (lvars,0 ,sizeof (*lvars)); }
drivers/staging/lustre/lustre/mgc/mgc_request.c +2 -0
@@ -397,6 +397,7 @@ static int config_log_end(char *logname, struct config_llog_instance *cfg)return rc; } +#ifdef LPROCFS int lprocfs_mgc_rd_ir_state (struct seq_file *m,void *data) {struct obd_device *obd = data;
@@ -420,6 +421,7 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data) return 0; } +#endif /* reenqueue any lost locks */ #define RQ_RUNNING 0x1
drivers/staging/lustre/lustre/obdclass/class_obd.c +7 -0
@@ -507,8 +507,15 @@ int obd_init_checks(void) }extern spinlock_t obd_types_lock; +#ifdef LPROCFS extern int class_procfs_init (void );extern int class_procfs_clean (void ); +#else +static inline int class_procfs_init (void ) +{return 0 ; } +static inline int class_procfs_clean (void ) +{return 0 ; } +#endif static int __init init_obdclass (void ) {
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +1 -3
@@ -295,9 +295,6 @@ struct lprocfs_vars lprocfs_base[] = { { "jobid_var", &obd_proc_jobid_var_fops }, { 0 } }; -#else -#define lprocfs_base NULL -#endif /* LPROCFS */static void *obd_device_list_seq_start (struct seq_file *p,loff_t *pos) {
@@ -403,3 +400,4 @@ int class_procfs_clean(void) }return 0 ; } +#endif /* LPROCFS */
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +174 -174
375 lines not on this page · raw message
drivers/staging/lustre/lustre/osc/Makefile +2 -1
@@ -1,6 +1,7 @@ obj-$(CONFIG_LUSTRE_FS) += osc.o -osc-y := osc_request.o lproc_osc.o osc_dev.o osc_object.o \ +osc-y := osc_request.o osc_dev.o osc_object.o \ osc_page.o osc_lock.o osc_io.o osc_quota.o osc_cache.o +osc-$(CONFIG_PROC_FS) += lproc_osc.o
drivers/staging/lustre/lustre/osc/lproc_osc.c +0 -2
@@ -42,7 +42,6 @@#include <linux/seq_file.h> #include "osc_internal.h" -#ifdef LPROCFS static int osc_active_seq_show (struct seq_file *m,void *v) {struct obd_device *dev = m->private;
@@ -724,4 +723,3 @@ void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars) lvars->module_vars = lprocfs_osc_module_vars; lvars->obd_vars = lprocfs_osc_obd_vars; } -#endif /* LPROCFS */
drivers/staging/lustre/lustre/ptlrpc/Makefile +2 -1
@@ -12,10 +12,11 @@ ptlrpc_objs := client.o recover.o connection.o niobuf.o pack_generic.o ptlrpc_objs += events.o ptlrpc_module.o service.o pinger.o ptlrpc_objs += llog_net.o llog_client.o import.o ptlrpcd.o ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o -ptlrpc_objs += sec.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o +ptlrpc_objs += sec.o sec_bulk.o sec_gc.o sec_config.o ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o ptlrpc-y := $(ldlm_objs) $(ptlrpc_objs) +ptlrpc-$(CONFIG_PROC_FS) += sec_lproc.o ptlrpc-$(CONFIG_LUSTRE_TRANSLATE_ERRNOS) += errno.o obj-$(CONFIG_PTLRPC_GSS) += gss/
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +6 -0
@@ -259,8 +259,14 @@ void sptlrpc_enc_pool_fini(void);int sptlrpc_proc_enc_pool_seq_show (struct seq_file *m,void *v);/* sec_lproc.c */ +#ifdef LPROCFS int sptlrpc_lproc_init (void );void sptlrpc_lproc_fini (void ); +#else +static inline int sptlrpc_lproc_init (void ) +{return 0 ; } +static inline void sptlrpc_lproc_fini (void ) {} +#endif /* sec_gc.c */ int sptlrpc_gc_init (void );
Signature · 1 line
1.7.9.5
PATCH 8/9 staging/lustre: fix undefined reference if CONFIG_PROC_FS is off
In reply to Peng TaoWhen building Lustre with CONFIG_PROC_FS off, we'll get many errors like:
drivers/staging/lustre/lustre/obdclass/llog_test.c:1053: error: implicit declaration of function ‘lprocfs_llog_test_init_vars’ make[3]: *** [drivers/staging/lustre/lustre/obdclass/llog_test.o] Error 1
make[2]: *** [drivers/staging/lustre/lustre/obdclass] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.odrivers/staging/lustre/lustre/ptlrpc/pinger.c: In function ‘ptlrpc_pinger_main’:drivers/staging/lustre/lustre/ptlrpc/pinger.c:331: error: implicit declaration of function ‘obd_update_maxusage’
The patch defines following symbols when CONFIG_PROC_FS is off:fld_type_proc_dir, obd_update_maxusage(), obd_max_pages, obd_max_alloc, obd_alloc, obd_pages, lprocfs_llog_test_init_vars().
--- drivers/staging/lustre/lustre/fld/fld_internal.h | 1 - drivers/staging/lustre/lustre/fld/fld_request.c | 2 +- .../staging/lustre/lustre/include/obd_support.h | 3 ++- drivers/staging/lustre/lustre/obdclass/class_obd.c | 6 ++++++ drivers/staging/lustre/lustre/obdclass/llog_test.c | 4 ++++ 5 files changed, 13 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/fld/fld_internal.h +0 -1
@@ -190,5 +190,4 @@ fld_target_name(struct lu_fld_target *tar) return (const char *)tar->ft_exp->exp_obd->obd_name; } -extern struct proc_dir_entry *fld_type_proc_dir;#endif /* __FLD_INTERNAL_H */
drivers/staging/lustre/lustre/fld/fld_request.c +1 -1
@@ -274,9 +274,9 @@ int fld_client_del_target(struct lu_client_fld *fld, __u64 idx) }EXPORT_SYMBOL (fld_client_del_target); -#ifdef LPROCFS struct proc_dir_entry *fld_type_proc_dir =NULL ; +#ifdef LPROCFS static int fld_client_proc_init (struct lu_client_fld *fld) {int rc;
drivers/staging/lustre/lustre/include/obd_support.h +2 -1
@@ -507,6 +507,8 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,extern atomic_t libcfs_kmemory; +extern void obd_update_maxusage (void ); +#ifdef LPROCFS #define obd_memory_add (size) \ lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size))
@@ -525,7 +527,6 @@ extern atomic_t libcfs_kmemory;lprocfs_stats_collector (obd_memory,OBD_MEMORY_PAGES_STAT , \ LPROCFS_FIELDS_FLAGS_SUM) -extern void obd_update_maxusage (void );extern __u64 obd_memory_max (void );extern __u64 obd_pages_max (void );
drivers/staging/lustre/lustre/obdclass/class_obd.c +6 -0
@@ -54,7 +54,13 @@ struct list_head obd_types;DEFINE_RWLOCK (obd_dev_lock);__u64 obd_max_pages =0 ; +EXPORT_SYMBOL (obd_max_pages);__u64 obd_max_alloc =0 ; +EXPORT_SYMBOL (obd_max_alloc); +__u64 obd_alloc; +EXPORT_SYMBOL (obd_alloc); +__u64 obd_pages; +EXPORT_SYMBOL (obd_pages);DEFINE_SPINLOCK (obd_updatemax_lock);/* The following are visible and mutable through /proc/sys/lustre/. */
drivers/staging/lustre/lustre/obdclass/llog_test.c +4 -0
@@ -947,6 +947,10 @@ static void lprocfs_llog_test_init_vars(struct lprocfs_static_vars *lvars) lvars->module_vars = lprocfs_llog_test_module_vars; lvars->obd_vars = lprocfs_llog_test_obd_vars; } +#else +static void lprocfs_llog_test_init_vars (struct lprocfs_static_vars *lvars) +{ +}#endif static int llog_test_cleanup (struct obd_device *obd)
Signature · 1 line
1.7.9.5
PATCH 5/9 staging/lustre: fix defined not used warning
In reply to Peng Taoregister_sysctl_table/unregister_sysctl_table are defined regardless of CONFIG_SYSCTL true or false. so we don't need to surround them with #ifdef CONFIG_SYSCTL. Besides, current code got build warnings when CONFIG_SYSCTL is not set:drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c:368:20: warning:
‘lnet_table’ defined but not used [-Wunused-variable]
--- drivers/staging/lustre/lnet/lnet/router_proc.c | 4 ---- .../lustre/lustre/libcfs/linux/linux-proc.c | 8 -------- 2 files changed, 12 deletions(-)
drivers/staging/lustre/lnet/lnet/router_proc.c +0 -4
@@ -908,21 +908,17 @@ static ctl_table_t top_table[] = {void lnet_proc_init (void ) { -#ifdef CONFIG_SYSCTL if (lnet_table_header ==NULL ) lnet_table_header =register_sysctl_table (top_table); -#endif }void lnet_proc_fini (void ) { -#ifdef CONFIG_SYSCTL if (lnet_table_header !=NULL )unregister_sysctl_table (lnet_table_header); lnet_table_header =NULL ; -#endif }#else
drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +0 -8
@@ -65,9 +65,7 @@#include <asm/div64.h> #include "tracefile.h" -#ifdef CONFIG_SYSCTL static ctl_table_header_t *lnet_table_header =NULL ; -#endif extern char lnet_upcall[1024 ];/** * The path of debug log dump upcall script.
@@ -518,7 +516,6 @@ static ctl_table_t lnet_table[] = { } }; -#ifdef CONFIG_SYSCTLstatic ctl_table_t top_table[] = { { .procname ="lnet" ,
@@ -530,23 +527,18 @@ static ctl_table_t top_table[] = { { } }; -#endif int insert_proc (void ) { -#ifdef CONFIG_SYSCTL if (lnet_table_header ==NULL ) lnet_table_header =register_sysctl_table (top_table); -#endif return 0 ; }void remove_proc (void ) { -#ifdef CONFIG_SYSCTL if (lnet_table_header !=NULL )unregister_sysctl_table (lnet_table_header); lnet_table_header =NULL ; -#endif }
Signature · 1 line
1.7.9.5
PATCH 3/9 staging/lustre/ldlm: inline ldlm_proc_setup
In reply to Peng Tao--- drivers/staging/lustre/lustre/include/lustre_dlm.h | 3 ++- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/include/lustre_dlm.h +2 -1
@@ -1285,10 +1285,11 @@ 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); -int ldlm_proc_setup (void );#ifdef LPROCFS +int ldlm_proc_setup (void );void ldlm_proc_cleanup (void );#else +static inline int ldlm_proc_setup (void ) {return 0 ; }static inline void ldlm_proc_cleanup (void ) {}#endif
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +0 -2
@@ -1012,11 +1012,9 @@ static int ldlm_setup(void)if (ldlm_state ==NULL )return -ENOMEM ; -#ifdef LPROCFS rc =ldlm_proc_setup ();if (rc !=0 )GOTO (out, rc); -#endif memset (&conf,0 ,sizeof (conf)); conf = (typeof (conf )) {
Signature · 1 line
1.7.9.5
PATCH 2/9 staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined
In reply to Peng TaoNo need to surround them with #ifdef LPROCFS.
--- drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/genops.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/obdclass/class_obd.c +2 -2
@@ -516,7 +516,7 @@ static int __init init_obdclass(void)spin_lock_init (&obd_types_lock);obd_zombie_impexp_init (); -#ifdef LPROCFS + obd_memory =lprocfs_alloc_stats (OBD_STATS_NUM ,LPROCFS_STATS_FLAG_NONE |LPROCFS_STATS_FLAG_IRQ_SAFE );
@@ -531,7 +531,7 @@ static int __init init_obdclass(void)lprocfs_counter_init (obd_memory,OBD_MEMORY_PAGES_STAT ,LPROCFS_CNTR_AVGMINMAX ,"pagesused" ,"pages" ); -#endif + err =obd_init_checks ();if (err == -EOVERFLOW )return err;
drivers/staging/lustre/lustre/obdclass/genops.c +1 -2
@@ -193,7 +193,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,strcpy (type->typ_name, name);spin_lock_init (&type->obd_type_lock); -#ifdef LPROCFS type->typ_procroot =lprocfs_register (type->typ_name, proc_lustre_root, vars, type);if (IS_ERR (type->typ_procroot)) {
@@ -201,7 +200,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, type->typ_procroot =NULL ;GOTO (failed, rc); } -#endif +if (ldt !=NULL ) { type->typ_lu = ldt; rc =lu_device_type_init (ldt);
Signature · 1 line
1.7.9.5
Greg Kroah-Hartman
maintainerRe: [PATCH 7/9] staging/lustre/llite: remove ll_file_get_iov_count
In reply to Peng TaoQuoted 9 lines · Peng Tao
It exactly copies
generic_segment_checks()except wrongly callingaccess_ok(VERIFY_READ)for aio read range. Drop it and just callgeneric_segment_checks()instead.Signed-off-by Peng Tao <[email protected]>Signed-off-by Andreas Dilger <[email protected]>--- drivers/staging/lustre/lustre/llite/file.c | 36 ++-------------------------- 1 file changed, 2 insertions(+), 34 deletions(-)
This patch breaks the build, in numerous ways, which means you didn't even build test this patch.
PLEASE be more careful, it's getting such that I really dread seeing these patches show up in my inbox...
greg k-h
Re: [PATCH 7/9] staging/lustre/llite: remove ll_file_get_iov_count
Quoted 11 lines · Greg Kroah-Hartman
Quoted 9 lines · Peng Tao
It exactly copies
generic_segment_checks()except wrongly callingaccess_ok(VERIFY_READ)for aio read range. Drop it and just callgeneric_segment_checks()instead.Signed-off-by Peng Tao <[email protected]>Signed-off-by Andreas Dilger <[email protected]>--- drivers/staging/lustre/lustre/llite/file.c | 36 ++-------------------------- 1 file changed, 2 insertions(+), 34 deletions(-)
Quoted 5 lines
This patch breaks the build, in numerous ways, which means you didn't even build test this patch.
PLEASE be more careful, it's getting such that I really dread seeing these patches show up in my inbox...
I am truly sorry. This one was added in the last and got in the middle after I reordered the series. Then I was under the impression that it was included when I tested the code. Really sorry for causing the trouble. I will be more careful.
I'll fix up and resend the rest of the series. Sorry for the noise.
Thanks,
Tao