Whamcloud - gitweb
LU-5275 lprocfs: replace LPROCFS with CONFIG_PROC_FS 99/13299/3
authorJohn L. Hammond <john.hammond@intel.com>
Sun, 11 Jan 2015 16:56:32 +0000 (11:56 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 19 Jan 2015 23:48:25 +0000 (23:48 +0000)
Instead of defining LPROCFS if CONFIG_PROC_FS is defined and testing
for LPROCFS just test for CONFIG_PROC_FS. This reduces the need to
ensure that params_tree.h has been included everywhere.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I1da970c5c932d329833d433615322a95b0c14011
Reviewed-on: http://review.whamcloud.com/13299
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
64 files changed:
libcfs/include/libcfs/params_tree.h
lustre/fid/fid_handler.c
lustre/fid/fid_internal.h
lustre/fid/fid_request.c
lustre/fid/lproc_fid.c
lustre/fld/fld_handler.c
lustre/fld/fld_internal.h
lustre/fld/fld_request.c
lustre/fld/lproc_fld.c
lustre/include/dt_object.h
lustre/include/lprocfs_status.h
lustre/include/lustre_dlm.h
lustre/include/lustre_net.h
lustre/include/obd_class.h
lustre/include/obd_support.h
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_resource.c
lustre/llite/llite_internal.h
lustre/llite/lproc_llite.c
lustre/lmv/lmv_internal.h
lustre/lmv/lmv_obd.c
lustre/lmv/lproc_lmv.c
lustre/lod/lod_pool.c
lustre/lod/lproc_lod.c
lustre/lov/lov_internal.h
lustre/lov/lov_obd.c
lustre/lov/lov_pool.c
lustre/lov/lproc_lov.c
lustre/mdc/lproc_mdc.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_request.c
lustre/mgc/lproc_mgc.c
lustre/mgc/mgc_internal.h
lustre/mgc/mgc_request.c
lustre/mgs/lproc_mgs.c
lustre/mgs/mgs_internal.h
lustre/obdclass/class_obd.c
lustre/obdclass/dt_object.c
lustre/obdclass/genops.c
lustre/obdclass/linux/linux-module.c
lustre/obdclass/lprocfs_counters.c
lustre/obdclass/lprocfs_jobstats.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lprocfs_status_server.c
lustre/obdclass/lu_object.c
lustre/obdclass/lu_ref.c
lustre/ofd/lproc_ofd.c
lustre/ofd/ofd_internal.h
lustre/osc/lproc_osc.c
lustre/osc/osc_internal.h
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_lproc.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_lproc.c
lustre/osp/lproc_osp.c
lustre/ost/ost_handler.c
lustre/ptlrpc/lproc_ptlrpc.c
lustre/ptlrpc/nrs_crr.c
lustre/ptlrpc/nrs_orr.c
lustre/ptlrpc/nrs_tbf.c
lustre/ptlrpc/ptlrpc_internal.h
lustre/quota/lproc_quota.c
lustre/quota/qmt_pool.c

index 649b255..16983d3 100644 (file)
 #include <linux/spinlock.h>
 
 #ifdef CONFIG_PROC_FS
-# define LPROCFS
-#endif /* CONFIG_PROC_FS */
-
-#ifdef LPROCFS
 # ifndef HAVE_ONLY_PROCFS_SEQ
 /* in lprocfs_stat.c, to protect the private data for proc entries */
 extern struct rw_semaphore             _lprocfs_lock;
@@ -101,5 +97,5 @@ static inline int LPROCFS_ENTRY_CHECK(struct inode *inode)
 #define LPROCFS_WRITE_EXIT()  do {} while(0)
 
 # endif /* !HAVE_ONLY_PROCFS_SEQ */
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 #endif  /* __PARAMS_TREE_H__ */
index d337ff1..11a9a54 100644 (file)
@@ -410,7 +410,7 @@ extern const struct file_operations seq_fld_proc_seq_fops;
 
 static int seq_server_proc_init(struct lu_server_seq *seq)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        int rc;
        ENTRY;
 
@@ -445,14 +445,14 @@ static int seq_server_proc_init(struct lu_server_seq *seq)
 out_cleanup:
        seq_server_proc_fini(seq);
        return rc;
-#else /* LPROCFS */
+#else /* !CONFIG_PROC_FS */
        return 0;
-#endif
+#endif /* CONFIG_PROC_FS */
 }
 
 static void seq_server_proc_fini(struct lu_server_seq *seq)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         ENTRY;
         if (seq->lss_proc_dir != NULL) {
                 if (!IS_ERR(seq->lss_proc_dir))
@@ -460,7 +460,7 @@ static void seq_server_proc_fini(struct lu_server_seq *seq)
                 seq->lss_proc_dir = NULL;
         }
         EXIT;
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 }
 
 int seq_server_init(const struct lu_env *env,
index 7acf8c6..25d317c 100644 (file)
@@ -60,7 +60,7 @@ enum {
 
 extern struct lu_context_key seq_thread_key;
 
-# ifdef LPROCFS
+# ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars seq_server_proc_list[];
 # endif
 
@@ -94,7 +94,7 @@ void fid_server_mod_exit(void);
 int seq_client_alloc_super(struct lu_client_seq *seq,
                           const struct lu_env *env);
 
-# ifdef LPROCFS
+# ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars seq_client_proc_list[];
 # endif
 
index 3c4a9e1..4f7fdf5 100644 (file)
@@ -423,7 +423,7 @@ EXPORT_SYMBOL(seq_client_flush);
 
 static void seq_client_proc_fini(struct lu_client_seq *seq)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        ENTRY;
        if (seq->lcs_proc_dir) {
                if (!IS_ERR(seq->lcs_proc_dir))
@@ -431,12 +431,12 @@ static void seq_client_proc_fini(struct lu_client_seq *seq)
                seq->lcs_proc_dir = NULL;
        }
        EXIT;
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 }
 
 static int seq_client_proc_init(struct lu_client_seq *seq)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         int rc;
         ENTRY;
 
@@ -464,9 +464,9 @@ out_cleanup:
         seq_client_proc_fini(seq);
         return rc;
 
-#else /* LPROCFS */
+#else /* !CONFIG_PROC_FS */
        return 0;
-#endif
+#endif /* CONFIG_PROC_FS */
 }
 
 int seq_client_init(struct lu_client_seq *seq,
index 9561391..616ef2e 100644 (file)
@@ -51,7 +51,7 @@
 #include <lprocfs_status.h>
 #include "fid_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /* Format: [0x64BIT_INT - 0x64BIT_INT] + 32 bytes just in case */
 #define MAX_FID_RANGE_STRLEN (32 + 2 * 2 * sizeof(__u64))
@@ -650,4 +650,5 @@ struct lprocfs_seq_vars seq_client_proc_list[] = {
          .fops =       &lprocfs_client_fid_fid_fops    },
        { NULL }
 };
-#endif
+
+#endif /* CONFIG_PROC_FS */
index 5260f2a..83e9e1b 100644 (file)
@@ -396,7 +396,7 @@ EXPORT_SYMBOL(fid_is_local);
 
 static void fld_server_proc_fini(struct lu_server_fld *fld);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int fld_server_proc_init(struct lu_server_fld *fld)
 {
         int rc = 0;
index 650e7ee..025e11e 100644 (file)
@@ -149,7 +149,7 @@ enum {
 extern struct lu_fld_hash fld_hash[];
 
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct proc_dir_entry *fld_type_proc_dir;
 extern struct lprocfs_seq_vars fld_client_proc_list[];
 #endif
@@ -187,7 +187,7 @@ void fld_server_mod_exit(void);
 
 int fld_server_read(const struct lu_env *env, struct lu_server_fld *fld,
                    struct lu_seq_range *range, void *data, int data_len);
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern const struct file_operations fld_proc_seq_fops;
 extern struct lprocfs_seq_vars fld_server_proc_list[];
 #endif
index 43c12b0..019e8fd 100644 (file)
@@ -229,7 +229,7 @@ int fld_client_del_target(struct lu_client_fld *fld, __u64 idx)
 }
 EXPORT_SYMBOL(fld_client_del_target);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int fld_client_proc_init(struct lu_client_fld *fld)
 {
        int rc;
@@ -270,7 +270,7 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
         }
         EXIT;
 }
-#else /* LPROCFS */
+#else /* !CONFIG_PROC_FS */
 static int fld_client_proc_init(struct lu_client_fld *fld)
 {
         return 0;
@@ -280,7 +280,7 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
 {
         return;
 }
-#endif /* !LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 EXPORT_SYMBOL(fld_client_proc_fini);
 
index bbbecb3..3378956 100644 (file)
@@ -51,7 +51,7 @@
 #include <lustre_fid.h>
 #include "fld_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int
 fld_proc_targets_seq_show(struct seq_file *m, void *unused)
 {
@@ -365,4 +365,4 @@ struct lprocfs_seq_vars fld_server_proc_list[] = {
 
 # endif /* HAVE_SERVER_SUPPORT */
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index b8ddd51..146aceb 100644 (file)
@@ -2760,13 +2760,13 @@ 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
+# ifdef CONFIG_PROC_FS
 int lprocfs_dt_blksize_seq_show(struct seq_file *m, void *v);
 int lprocfs_dt_kbytestotal_seq_show(struct seq_file *m, void *v);
 int lprocfs_dt_kbytesfree_seq_show(struct seq_file *m, void *v);
 int lprocfs_dt_kbytesavail_seq_show(struct seq_file *m, void *v);
 int lprocfs_dt_filestotal_seq_show(struct seq_file *m, void *v);
 int lprocfs_dt_filesfree_seq_show(struct seq_file *m, void *v);
-# endif /* LPROCFS */
+# endif /* CONFIG_PROC_FS */
 
 #endif /* __LUSTRE_DT_OBJECT_H */
index beb0413..3615d21 100644 (file)
@@ -410,7 +410,7 @@ struct obd_job_stats {
        time_t                  ojs_last_cleanup;
 };
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats,
                                   unsigned int cpuid);
@@ -937,8 +937,7 @@ extern int lprocfs_quota_rd_qs_factor(char *page, char **start, off_t off,
 extern int lprocfs_quota_wr_qs_factor(struct file *file,
                                       const char *buffer,
                                       unsigned long count, void *data);
-#else
-/* LPROCFS is not defined */
+#else /* !CONFIG_PROC_FS */
 
 #define proc_lustre_root NULL
 
@@ -1168,6 +1167,6 @@ int lprocfs_job_stats_init(struct obd_device *obd, int cntr_num,
 /* lproc_ptlrpc.c */
 #define target_print_req NULL
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 #endif /* LPROCFS_SNMP_H */
index fde9cc0..f77e8ec 100644 (file)
@@ -1385,7 +1385,7 @@ 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
+#ifdef CONFIG_PROC_FS
 void ldlm_proc_cleanup(void);
 #else
 static inline void ldlm_proc_cleanup(void) {}
index 2bbbb20..085a811 100644 (file)
@@ -3567,7 +3567,7 @@ void ptlrpcd_decref(void);
  * @{
  */
 const char* ll_opcode2str(__u32 opcode);
-#ifdef LPROCFS
+#ifdef 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);
index 92d3cdc..79f9ece 100644 (file)
@@ -356,7 +356,7 @@ do {                                                            \
 } while (0)
 
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 #define OBD_COUNTER_OFFSET(op)                                                \
        ((offsetof(struct obd_ops, o_ ## op) -                                 \
          offsetof(struct obd_ops, o_iocontrol))                               \
index 9565f82..7893c79 100644 (file)
@@ -600,7 +600,7 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,
 
 extern atomic_t libcfs_kmemory;
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 #define obd_memory_add(size)                                                  \
         lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size))
 #define obd_memory_sub(size)                                                  \
@@ -622,7 +622,7 @@ extern void obd_update_maxusage(void);
 extern __u64 obd_memory_max(void);
 extern __u64 obd_pages_max(void);
 
-#else /* LPROCFS */
+#else /* CONFIG_PROC_FS */
 
 extern __u64 obd_alloc;
 extern __u64 obd_pages;
@@ -660,7 +660,7 @@ static inline void obd_pages_sub(int order)
 #define obd_memory_max() (obd_max_alloc)
 #define obd_pages_max() (obd_max_pages)
 
-#endif /* !LPROCFS */
+#endif /* !CONFIG_PROC_FS */
 
 #define OBD_DEBUG_MEMUSAGE (1)
 
index aba247f..a277287 100644 (file)
@@ -2846,11 +2846,11 @@ static int ldlm_setup(void)
         if (ldlm_state == NULL)
                 RETURN(-ENOMEM);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         rc = ldlm_proc_setup();
         if (rc != 0)
                GOTO(out, rc);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
        memset(&conf, 0, sizeof(conf));
        conf = (typeof(conf)) {
index 4fb6d93..b86abc4 100644 (file)
@@ -69,7 +69,7 @@ struct proc_dir_entry *ldlm_svc_proc_dir;
  * DDOS. */
 static unsigned int ldlm_dump_granted_max = 256;
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static ssize_t
 lprocfs_dump_ns_seq_write(struct file *file, const char __user *buffer,
                          size_t count, loff_t *off)
@@ -383,12 +383,12 @@ static int ldlm_namespace_proc_register(struct ldlm_namespace *ns)
        return 0;
 }
 #undef MAX_STRING_SIZE
-#else /* LPROCFS */
+#else /* CONFIG_PROC_FS */
 
 #define ldlm_namespace_proc_unregister(ns)      ({;})
 #define ldlm_namespace_proc_register(ns)        ({0;})
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 static unsigned ldlm_res_hop_hash(cfs_hash_t *hs,
                                   const void *key, unsigned mask)
index 2d83eca..5961ed0 100644 (file)
@@ -696,7 +696,7 @@ static inline int ll_need_32bit_api(struct ll_sb_info *sbi)
 void ll_ras_enter(struct file *f);
 
 /* llite/lproc_llite.c */
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
                                 struct super_block *sb, char *osc, char *mdc);
 void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi);
index a0aea00..f77393d 100644 (file)
@@ -45,7 +45,7 @@
 
 struct proc_dir_entry *proc_lustre_fs_root;
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 /* /proc/lustre/llite mount point registration */
 static const struct file_operations ll_rw_extents_stats_fops;
 static const struct file_operations ll_rw_extents_stats_pp_fops;
@@ -1684,4 +1684,4 @@ static ssize_t ll_rw_offset_stats_seq_write(struct file *file,
 }
 
 LPROC_SEQ_FOPS(ll_rw_offset_stats);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index 75dbd50..b3faa6d 100644 (file)
@@ -162,7 +162,7 @@ struct lmv_tgt_desc
 *lmv_locate_mds(struct lmv_obd *lmv, struct md_op_data *op_data,
                struct lu_fid *fid);
 /* lproc_lmv.c */
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars lprocfs_lmv_obd_vars[];
 #endif
 extern struct file_operations lmv_proc_target_fops;
index aca1a34..00f8de4 100644 (file)
@@ -1373,7 +1373,7 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
        spin_lock_init(&lmv->lmv_lock);
        mutex_init(&lmv->lmv_init_mutex);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        obd->obd_vars = lprocfs_lmv_obd_vars;
        lprocfs_obd_setup(obd);
        lprocfs_alloc_md_stats(obd, 0);
index 362b3c6..5576798 100644 (file)
@@ -44,7 +44,7 @@
 
 #include "lmv_internal.h"
 
-#ifndef LPROCFS
+#ifndef CONFIG_PROC_FS
 static struct lprocfs_vars lprocfs_module_vars[] = { {0} };
 static struct lprocfs_vars lprocfs_obd_vars[] = { {0} };
 #else
@@ -226,4 +226,4 @@ struct file_operations lmv_proc_target_fops = {
         .llseek               = seq_lseek,
         .release              = seq_release,
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index c9a008f..19e473f 100644 (file)
@@ -667,7 +667,7 @@ int lod_pool_new(struct obd_device *obd, char *poolname)
 
        INIT_HLIST_NODE(&new_pool->pool_hash);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        pool_getref(new_pool);
        new_pool->pool_proc_entry = lprocfs_add_simple(lod->lod_pool_proc_entry,
                                                       poolname, new_pool,
index b6eafe3..c30dc11 100644 (file)
@@ -47,7 +47,7 @@
  * called by Linux kernel's procfs.
  */
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /**
  * Show default stripe size.
@@ -850,5 +850,5 @@ void lod_procfs_fini(struct lod_device *lod)
        lprocfs_obd_cleanup(obd);
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
index ad66db8..d4681af 100644 (file)
@@ -211,7 +211,7 @@ void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm);
 
 /* lproc_lov.c */
 extern struct file_operations lov_proc_target_fops;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars lprocfs_lov_obd_vars[];
 #endif
 
index 6386d00..f49d5ce 100644 (file)
@@ -782,7 +782,7 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
        struct lov_desc *desc;
        struct lov_obd *lov = &obd->u.lov;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        struct obd_type *type;
 #endif
        int rc;
@@ -838,7 +838,7 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
         if (rc)
                GOTO(out, rc);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        obd->obd_vars = lprocfs_lov_obd_vars;
        /* If this is true then both client (lov) and server
         * (lod) are on the same node. The lod layer if loaded
index 1fc3a6d..1d6360e 100644 (file)
@@ -153,7 +153,7 @@ cfs_hash_ops_t pool_hash_operations = {
 
 };
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 /* ifdef needed for liblustre support */
 /*
  * pool /proc seq_file methods
@@ -295,7 +295,7 @@ static struct file_operations pool_proc_operations = {
         .llseek         = seq_lseek,
         .release        = seq_release,
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 void lov_dump_pool(int level, struct pool_desc *pool)
 {
@@ -457,7 +457,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
 
        INIT_HLIST_NODE(&new_pool->pool_hash);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         /* we need this assert seq_file is not implementated for liblustre */
         /* get ref for /proc file */
         lov_pool_getref(new_pool);
index d785880..5fe5bff 100644 (file)
@@ -42,7 +42,7 @@
 #include <lustre_param.h>
 #include "lov_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int lov_stripesize_seq_show(struct seq_file *m, void *v)
 {
        struct obd_device *dev = (struct obd_device *)m->private;
@@ -308,4 +308,4 @@ struct file_operations lov_proc_target_fops = {
         .llseek  = seq_lseek,
         .release = lprocfs_seq_release,
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index 3eaf776..faaf490 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "mdc_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 static int mdc_max_rpcs_in_flight_seq_show(struct seq_file *m, void *v)
 {
@@ -144,4 +144,4 @@ struct lprocfs_seq_vars lprocfs_mdc_obd_vars[] = {
          .fops =       &mdc_pinger_recov_fops          },
        { NULL }
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index c82bdc2..e1691a0 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <lustre_mdc.h>
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars lprocfs_mdc_obd_vars[];
 #endif
 
index 1ca5127..55fbdef 100644 (file)
@@ -2882,7 +2882,7 @@ static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
         rc = client_obd_setup(obd, cfg);
         if (rc)
                 GOTO(err_close_lock, rc);
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        obd->obd_vars = lprocfs_mdc_obd_vars;
        lprocfs_obd_setup(obd);
        lprocfs_alloc_md_stats(obd, 0);
index 5de4f17..55e8d80 100644 (file)
@@ -41,7 +41,7 @@
 #include <lprocfs_status.h>
 #include "mgc_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 LPROC_SEQ_FOPS_RO_TYPE(mgc, uuid);
 LPROC_SEQ_FOPS_RO_TYPE(mgc, connect_flags);
@@ -78,4 +78,4 @@ struct lprocfs_seq_vars lprocfs_mgc_obd_vars[] = {
          .fops =       &mgc_ir_state_fops      },
        { NULL }
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index 292a212..97ecd7d 100644 (file)
 #include <lustre_log.h>
 #include <lustre_export.h>
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars lprocfs_mgc_obd_vars[];
 int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data);
-#endif  /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld);
 
index c662b86..c14e760 100644 (file)
@@ -464,7 +464,7 @@ static int config_log_end(char *logname, struct config_llog_instance *cfg)
         RETURN(rc);
 }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
 {
        struct obd_device       *obd = data;
@@ -928,7 +928,7 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
                GOTO(err_cleanup, rc);
        }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        obd->obd_vars = lprocfs_mgc_obd_vars;
        lprocfs_obd_setup(obd);
 #endif
index ae4cc39..ed703c0 100644 (file)
@@ -43,7 +43,7 @@
 #include <lustre_param.h>
 #include "mgs_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 static int mgs_fs_seq_show(struct seq_file *seq, void *v)
 {
index 7118ab6..4fdaee4 100644 (file)
@@ -252,7 +252,7 @@ int mgs_client_free(struct obd_export *exp);
 int mgs_fs_setup(const struct lu_env *env, struct mgs_device *m);
 int mgs_fs_cleanup(const struct lu_env *env, struct mgs_device *m);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 int lproc_mgs_setup(struct mgs_device *mgs, const char *osd_name);
 void lproc_mgs_cleanup(struct mgs_device *mgs);
 int lproc_mgs_add_live(struct mgs_device *mgs, struct fs_db *fsdb);
index dfb17d2..41c3066 100644 (file)
@@ -58,7 +58,7 @@ EXPORT_SYMBOL(obd_devs);
 struct list_head obd_types;
 DEFINE_RWLOCK(obd_dev_lock);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static __u64 obd_max_pages;
 static __u64 obd_max_alloc;
 #else
@@ -110,7 +110,7 @@ EXPORT_SYMBOL(obd_dirty_transit_pages);
 char obd_jobid_var[JOBSTATS_JOBID_VAR_MAX_LEN + 1] = JOBSTATS_DISABLE;
 EXPORT_SYMBOL(obd_jobid_var);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 struct lprocfs_stats *obd_memory = NULL;
 EXPORT_SYMBOL(obd_memory);
 #endif
@@ -518,7 +518,7 @@ static int __init init_obdclass(void)
 
        spin_lock_init(&obd_types_lock);
         obd_zombie_impexp_init();
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM,
                                         LPROCFS_STATS_FLAG_NONE |
                                         LPROCFS_STATS_FLAG_IRQ_SAFE);
@@ -617,7 +617,7 @@ void obd_update_maxusage(void)
 }
 EXPORT_SYMBOL(obd_update_maxusage);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 __u64 obd_memory_max(void)
 {
        __u64 ret;
@@ -641,7 +641,7 @@ __u64 obd_pages_max(void)
        return ret;
 }
 EXPORT_SYMBOL(obd_pages_max);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 /* liblustre doesn't call cleanup_obdclass, apparently.  we carry on in this
  * ifdef to the end of the file to cover module and versioning goo.*/
index 8a7372c..fa38fdc 100644 (file)
@@ -956,7 +956,7 @@ out:
 }
 EXPORT_SYMBOL(dt_index_read);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 int lprocfs_dt_blksize_seq_show(struct seq_file *m, void *v)
 {
        struct dt_device *dt = m->private;
@@ -1050,4 +1050,4 @@ int lprocfs_dt_filesfree_seq_show(struct seq_file *m, void *v)
 }
 EXPORT_SYMBOL(lprocfs_dt_filesfree_seq_show);
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index d317c7c..50eb6b5 100644 (file)
@@ -195,7 +195,7 @@ 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
+#ifdef CONFIG_PROC_FS
        if (enable_proc) {
                type->typ_procroot = lprocfs_seq_register(type->typ_name,
                                                          proc_lustre_root,
@@ -222,7 +222,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
 
 failed:
        if (type->typ_name != NULL) {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
                if (type->typ_procroot != NULL) {
 #ifndef HAVE_ONLY_PROCFS_SEQ
                        lprocfs_try_remove_proc_entry(type->typ_name,
@@ -266,7 +266,7 @@ int class_unregister_type(const char *name)
         * other modules can share names (i.e. lod can use lov entry). so
         * we can't reference pointer as it can get invalided when another
         * module removes the entry */
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        if (type->typ_procroot != NULL) {
 #ifndef HAVE_ONLY_PROCFS_SEQ
                lprocfs_try_remove_proc_entry(type->typ_name, proc_lustre_root);
index 3b574b7..15ec19c 100644 (file)
@@ -213,7 +213,7 @@ struct miscdevice obd_psdev = {
 };
 
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int obd_proc_version_seq_show(struct seq_file *m, void *v)
 {
        return seq_printf(m, "lustre: %s\nkernel: %s\nbuild:  %s\n",
@@ -326,7 +326,7 @@ static struct lprocfs_seq_vars lprocfs_base[] = {
 };
 #else
 #define lprocfs_base NULL
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 static void *obd_device_list_seq_start(struct seq_file *p, loff_t *pos)
 {
index 7e78335..bbdcfd4 100644 (file)
@@ -40,7 +40,7 @@
 #include <lustre_lib.h>
 #include <lprocfs_status.h>
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, long amount)
 {
        struct lprocfs_counter          *percpu_cntr;
@@ -134,4 +134,4 @@ void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx, long amount)
        lprocfs_stats_unlock(stats, LPROCFS_GET_SMP_ID, &flags);
 }
 EXPORT_SYMBOL(lprocfs_counter_sub);
-#endif  /* LPROCFS */
+#endif  /* CONFIG_PROC_FS */
index 6bb1661..d3b0be0 100644 (file)
@@ -35,7 +35,7 @@
 #include <lprocfs_status.h>
 #include <lustre/lustre_idl.h>
 
-#if defined(LPROCFS)
+#ifdef CONFIG_PROC_FS
 
 /*
  * JobID formats & JobID environment variable names for supported
@@ -561,4 +561,4 @@ lprocfs_job_interval_seq_write(struct file *file, const char *buffer,
        return count;
 }
 EXPORT_SYMBOL(lprocfs_job_interval_seq_write);
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/
index 259b79c..f0ff132 100644 (file)
@@ -45,7 +45,7 @@
 #include <lprocfs_status.h>
 #include <lustre/lustre_idl.h>
 
-#if defined(LPROCFS)
+#ifdef CONFIG_PROC_FS
 
 static int lprocfs_no_percpu_stats = 0;
 CFS_MODULE_PARM(lprocfs_no_percpu_stats, "i", int, 0644,
@@ -2217,4 +2217,4 @@ failed:
 }
 EXPORT_SYMBOL(lprocfs_wr_nosquash_nids);
 
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/
index d54fd09..cfefaa5 100644 (file)
@@ -40,7 +40,7 @@
 #include <lustre/lustre_idl.h>
 #include <lustre_nodemap.h>
 
-#if defined(LPROCFS)
+#ifdef CONFIG_PROC_FS
 
 int lprocfs_evict_client_open(struct inode *inode, struct file *f)
 {
@@ -705,4 +705,4 @@ int lprocfs_target_instance_seq_show(struct seq_file *m, void *data)
 }
 EXPORT_SYMBOL(lprocfs_target_instance_seq_show);
 
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/
index 20c4393..2053bd3 100644 (file)
@@ -2172,7 +2172,7 @@ void lu_global_fini(void)
 
 static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         struct lprocfs_counter ret;
 
         lprocfs_stats_collect(stats, idx, &ret);
index 2cdba58..a1bfc25 100644 (file)
@@ -291,7 +291,7 @@ void lu_ref_del_at(struct lu_ref *ref, struct lu_ref_link *link,
 }
 EXPORT_SYMBOL(lu_ref_del_at);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 static void *lu_ref_seq_start(struct seq_file *seq, loff_t *pos)
 {
@@ -415,7 +415,7 @@ static struct file_operations lu_ref_dump_fops = {
         .release = lu_ref_seq_release
 };
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 int lu_ref_global_init(void)
 {
@@ -428,23 +428,23 @@ int lu_ref_global_init(void)
        spin_lock_init(&lu_ref_refs_guard);
         result = lu_kmem_init(lu_ref_caches);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         if (result == 0) {
                 result = lprocfs_seq_create(proc_lustre_root, "lu_refs",
                                             0444, &lu_ref_dump_fops, NULL);
                 if (result)
                         lu_kmem_fini(lu_ref_caches);
         }
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
         return result;
 }
 
 void lu_ref_global_fini(void)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         lprocfs_remove_proc_entry("lu_refs", proc_lustre_root);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
         lu_kmem_fini(lu_ref_caches);
 }
 
index b3b0bfa..c6b7d26 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "ofd_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /**
  * Show number of FID allocation sequences.
@@ -1094,4 +1094,4 @@ void ofd_stats_counter_init(struct lprocfs_stats *stats)
                             0, "quotactl", "reqs");
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index 8cebf32..e2a1f77 100644 (file)
@@ -402,7 +402,7 @@ int ofd_txn_stop_cb(const struct lu_env *env, struct thandle *txn,
                    void *cookie);
 
 /* lproc_ofd.c */
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars lprocfs_ofd_obd_vars[];
 void ofd_stats_counter_init(struct lprocfs_stats *stats);
 #else
index a215cf1..f346dfd 100644 (file)
@@ -43,7 +43,7 @@
 #include <linux/seq_file.h>
 #include "osc_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int osc_active_seq_show(struct seq_file *m, void *v)
 {
        struct obd_device *dev = m->private;
@@ -802,4 +802,4 @@ int lproc_osc_attach_seqstat(struct obd_device *dev)
 
        return rc;
 }
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index d68d80c..dbec70d 100644 (file)
@@ -144,7 +144,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock);
 int osc_cleanup(struct obd_device *obd);
 int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 extern struct lprocfs_seq_vars lprocfs_osc_obd_vars[];
 int lproc_osc_attach_seqstat(struct obd_device *dev);
 #else
index 5fdeb24..d54856d 100644 (file)
@@ -2943,7 +2943,7 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
        cli->cl_grant_shrink_interval = GRANT_SHRINK_INTERVAL;
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        obd->obd_vars = lprocfs_osc_obd_vars;
 #endif
        /* If this is true then both client (osc) and server (osp) are on the
index f6a04a3..2f30053 100644 (file)
@@ -375,7 +375,7 @@ enum dt_txn_op {
  * osd dev stats
  */
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 enum {
         LPROC_OSD_READ_BYTES    = 0,
         LPROC_OSD_WRITE_BYTES   = 1,
@@ -643,7 +643,7 @@ static inline int __osd_xattr_set(struct osd_thread_info *info,
        return inode->i_op->setxattr(dentry, name, buf, buflen, fl);
 }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 /* osd_lproc.c */
 extern struct lprocfs_seq_vars lprocfs_osd_obd_vars[];
 extern struct lprocfs_seq_vars lprocfs_osd_module_vars[];
index c02af7a..6a2ebd7 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "osd_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 void osd_brw_stats_update(struct osd_device *osd, struct osd_iobuf *iobuf)
 {
index 10791a5..47f9a2e 100644 (file)
@@ -412,7 +412,7 @@ static inline char *osd_name(struct osd_device *osd)
        return osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name;
 }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 enum {
        LPROC_OSD_READ_BYTES = 0,
        LPROC_OSD_WRITE_BYTES = 1,
index 8146c16..ea893e3 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "osd_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 #define pct(a, b) (b ? a * 100 / b : 0)
 
index 2af2a1a..5a8a3b6 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "osp_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 /**
  * Show OSP active status
  *
@@ -848,5 +848,5 @@ void osp_lprocfs_init(struct osp_device *osp)
                       obd->obd_name);
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
index 5e57e61..f635de2 100644 (file)
@@ -71,7 +71,7 @@ CFS_MODULE_PARM(oss_io_cpts, "s", charp, 0444,
 
 static struct cfs_cpt_table    *ost_io_cptable;
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 LPROC_SEQ_FOPS_RO_TYPE(ost, uuid);
 
 static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = {
@@ -79,7 +79,7 @@ static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = {
          .fops =       &ost_uuid_fops  },
        { NULL }
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 /* Sigh - really, this is an OSS, the _server_, not the _target_ */
 static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
@@ -90,7 +90,7 @@ static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
        int rc;
        ENTRY;
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        obd->obd_vars = lprocfs_ost_obd_vars;
        lprocfs_obd_setup(obd);
 #endif
index c937066..75b27a6 100644 (file)
@@ -184,7 +184,7 @@ static const char *ll_eopcode2str(__u32 opcode)
         return ll_eopcode_table[opcode].opname;
 }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir,
                              char *name, struct proc_dir_entry **procroot_ret,
                              struct lprocfs_stats **stats_ret)
@@ -1314,4 +1314,4 @@ lprocfs_pinger_recov_seq_write(struct file *file, const char *buffer,
 }
 EXPORT_SYMBOL(lprocfs_pinger_recov_seq_write);
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index 3d62e51..f5bd032 100644 (file)
@@ -610,7 +610,7 @@ static void nrs_crrn_req_stop(struct ptlrpc_nrs_policy *policy,
               libcfs_id2str(req->rq_peer), nrq->nr_u.crr.cr_round);
 }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /**
  * lprocfs interface
@@ -846,7 +846,7 @@ static void nrs_crrn_lprocfs_fini(struct ptlrpc_service *svc)
        lprocfs_remove_proc_entry("nrs_crrn_quantum", svc->srv_procroot);
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 /**
  * CRR-N policy operations
@@ -861,7 +861,7 @@ static const struct ptlrpc_nrs_pol_ops nrs_crrn_ops = {
        .op_req_enqueue         = nrs_crrn_req_add,
        .op_req_dequeue         = nrs_crrn_req_del,
        .op_req_stop            = nrs_crrn_req_stop,
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        .op_lprocfs_init        = nrs_crrn_lprocfs_init,
        .op_lprocfs_fini        = nrs_crrn_lprocfs_fini,
 #endif
index 46b4392..7dcb3a4 100644 (file)
@@ -1161,7 +1161,7 @@ static void nrs_orr_req_stop(struct ptlrpc_nrs_policy *policy,
  * lprocfs interface
  */
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /**
  * This allows to bundle the policy name into the lprocfs_vars::data pointer
@@ -1889,7 +1889,7 @@ static void nrs_orr_lprocfs_fini(struct ptlrpc_service *svc)
        lprocfs_remove_proc_entry("nrs_orr_supported", svc->srv_procroot);
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 static const struct ptlrpc_nrs_pol_ops nrs_orr_ops = {
        .op_policy_init         = nrs_orr_init,
@@ -1902,7 +1902,7 @@ static const struct ptlrpc_nrs_pol_ops nrs_orr_ops = {
        .op_req_enqueue         = nrs_orr_req_add,
        .op_req_dequeue         = nrs_orr_req_del,
        .op_req_stop            = nrs_orr_req_stop,
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        .op_lprocfs_init        = nrs_orr_lprocfs_init,
        .op_lprocfs_fini        = nrs_orr_lprocfs_fini,
 #endif
@@ -1921,7 +1921,7 @@ struct ptlrpc_nrs_pol_conf nrs_conf_orr = {
  * TRR reuses much of the functions and data structures of ORR
  */
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 static int nrs_trr_lprocfs_init(struct ptlrpc_service *svc)
 {
@@ -1961,7 +1961,7 @@ static void nrs_trr_lprocfs_fini(struct ptlrpc_service *svc)
        lprocfs_remove_proc_entry("nrs_trr_supported", svc->srv_procroot);
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 /**
  * Reuse much of the ORR functionality for TRR.
@@ -1977,7 +1977,7 @@ static const struct ptlrpc_nrs_pol_ops nrs_trr_ops = {
        .op_req_enqueue         = nrs_orr_req_add,
        .op_req_dequeue         = nrs_orr_req_del,
        .op_req_stop            = nrs_orr_req_stop,
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        .op_lprocfs_init        = nrs_trr_lprocfs_init,
        .op_lprocfs_fini        = nrs_trr_lprocfs_fini,
 #endif
index b5d00d3..34b2983 100644 (file)
@@ -1549,7 +1549,7 @@ static void nrs_tbf_req_stop(struct ptlrpc_nrs_policy *policy,
               nrq->nr_u.tbf.tr_sequence);
 }
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /**
  * lprocfs interface
@@ -1854,7 +1854,7 @@ static void nrs_tbf_lprocfs_fini(struct ptlrpc_service *svc)
        lprocfs_remove_proc_entry("nrs_tbf_rule", svc->srv_procroot);
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 /**
  * TBF policy operations
@@ -1869,7 +1869,7 @@ static const struct ptlrpc_nrs_pol_ops nrs_tbf_ops = {
        .op_req_enqueue         = nrs_tbf_req_add,
        .op_req_dequeue         = nrs_tbf_req_del,
        .op_req_stop            = nrs_tbf_req_stop,
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
        .op_lprocfs_init        = nrs_tbf_lprocfs_init,
        .op_lprocfs_fini        = nrs_tbf_lprocfs_fini,
 #endif
index dffe43c..9db78ec 100644 (file)
@@ -96,7 +96,7 @@ void ptlrpc_initiate_recovery(struct obd_import *imp);
 int lustre_unpack_req_ptlrpc_body(struct ptlrpc_request *req, int offset);
 int lustre_unpack_rep_ptlrpc_body(struct ptlrpc_request *req, int offset);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 void ptlrpc_lprocfs_register_service(struct proc_dir_entry *proc_entry,
                                      struct ptlrpc_service *svc);
 void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc);
@@ -108,7 +108,7 @@ void ptlrpc_lprocfs_do_request_stat (struct ptlrpc_request *req,
 #define ptlrpc_lprocfs_unregister_service(params...) do{}while(0)
 #define ptlrpc_lprocfs_rpc_sent(params...) do{}while(0)
 #define ptlrpc_lprocfs_do_request_stat(params...) do{}while(0)
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 /* NRS */
 
index 1102d6e..913db2c 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/seq_file.h>
 #include "lquota_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 /* structure allocated at seq_open time and release when seq_release is called.
  * It is passed to seq_start/stop/next/show which can thus use the same lu_env
  * to be used with the iterator API */
@@ -317,4 +317,4 @@ struct file_operations lprocfs_quota_seq_fops = {
        .llseek         = seq_lseek,
        .release        = lprocfs_quota_seq_release,
 };
-#endif  /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
index 8048522..c3215c9 100644 (file)
@@ -565,7 +565,7 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt,
                        if (IS_ERR(lqe))
                                RETURN(PTR_ERR(lqe));
                        pool->qpi_grace_lqe[qtype] = lqe;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
                        /* add procfs file to dump the global index, mostly for
                         * debugging purpose */
                        sprintf(qti->qti_buf, "glb-%s", QTYPE_NAME(qtype));