int seq_client_alloc_super(struct lu_client_seq *seq,
const struct lu_env *env);
-# ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
extern struct lprocfs_vars seq_client_proc_list[];
-# endif
+#endif
extern struct proc_dir_entry *seq_type_proc_dir;
static void seq_client_proc_fini(struct lu_client_seq *seq)
{
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
if (seq->lcs_proc_dir) {
if (!IS_ERR(seq->lcs_proc_dir))
lprocfs_remove(&seq->lcs_proc_dir);
seq->lcs_proc_dir = NULL;
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
}
static int seq_client_proc_init(struct lu_client_seq *seq)
{
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
int rc;
seq->lcs_proc_dir = lprocfs_register(seq->lcs_name,
seq_client_proc_fini(seq);
return rc;
-#else /* LPROCFS */
+#else /* CONFIG_PROC_FS */
return 0;
#endif
}
int fld_client_rpc(struct obd_export *exp,
struct lu_seq_range *range, __u32 fld_op);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
extern struct lprocfs_vars fld_client_proc_list[];
#endif
struct proc_dir_entry *fld_type_proc_dir = NULL;
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
static int fld_client_proc_init(struct lu_client_fld *fld)
{
int rc;
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,
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 */
#include "linux/lprocfs_status.h"
#include "lustre/lustre_idl.h"
-#include "../../include/linux/libcfs/params_tree.h"
struct lprocfs_vars {
const char *name;
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);
const char *buffer,
unsigned long count, void *data);
#else
-/* LPROCFS is not defined */
+/* CONFIG_PROC_FS is not defined */
#define proc_lustre_root NULL
/* lproc_ptlrpc.c */
#define target_print_req NULL
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#endif /* LPROCFS_SNMP_H */
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
* @{
*/
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);
/*
* 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);
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)
} 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)) \
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) \
}
EXPORT_SYMBOL(ldlm_pool_setup);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
static int lprocfs_pool_state_seq_show(struct seq_file *m, void *unused)
{
int granted, grant_rate, cancel_rate, grant_step;
pl->pl_proc_dir = NULL;
}
}
-#else /* !LPROCFS */
+#else /* !CONFIG_PROC_FS */
static int ldlm_pool_proc_init(struct ldlm_pool *pl)
{
return 0;
}
static void ldlm_pool_proc_fini(struct ldlm_pool *pl) {}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns,
int idx, ldlm_side_t client)
* DDOS. */
unsigned int ldlm_dump_granted_max = 256;
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
static ssize_t lprocfs_wr_dump_ns(struct file *file, const char *buffer,
size_t count, loff_t *off)
{
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(struct cfs_hash *hs,
const void *key, unsigned mask)
struct ll_ra_read *ll_ra_read_get(struct file *f);
/* llite/lproc_llite.c */
-#ifdef LPROCFS
+#if defined (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);
*lmv_locate_mds(struct lmv_obd *lmv, struct md_op_data *op_data,
struct lu_fid *fid);
/* lproc_lmv.c */
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars)
lprocfs_lmv_init_vars(&lvars);
lprocfs_obd_setup(obd, lvars.obd_vars);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
{
rc = lprocfs_seq_create(obd->obd_proc_entry, "target_obd",
0444, &lmv_proc_target_fops, obd);
int lovea_destroy_object(struct lov_obd *lov, struct lov_stripe_md *lsm,
struct obdo *oa, void *data);
/* lproc_lov.c */
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
extern const struct file_operations lov_proc_target_fops;
void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars);
#else
lprocfs_lov_init_vars(&lvars);
lprocfs_obd_setup(obd, lvars.obd_vars);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
{
int rc1;
};
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
/* ifdef needed for liblustre support */
/*
* pool /proc seq_file methods
.llseek = seq_lseek,
.release = seq_release,
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
void lov_dump_pool(int level, struct pool_desc *pool)
{
INIT_HLIST_NODE(&new_pool->pool_hash);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
/* we need this assert seq_file is not implemented for liblustre */
/* get ref for /proc file */
lov_pool_getref(new_pool);
}
EXPORT_SYMBOL(l_dentry_open);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
__s64 lprocfs_read_helper(struct lprocfs_counter *lc,
struct lprocfs_counter_header *header,
enum lprocfs_stats_flags flags,
return ret;
}
EXPORT_SYMBOL(lprocfs_read_helper);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS*/
MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
MODULE_DESCRIPTION("Lustre VFS Filesystem Helper v0.1");
#include "../include/lustre_mdc.h"
#include "../include/lustre_mds.h"
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars)
#include "../include/lustre_log.h"
#include "../include/lustre_export.h"
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars);
int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data);
#else
{
return 0;
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld);
return rc;
}
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
{
struct obd_device *obd = data;
}
extern spinlock_t obd_types_lock;
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
extern int class_procfs_init(void);
extern int class_procfs_clean(void);
#else
}
EXPORT_SYMBOL(obd_update_maxusage);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
__u64 obd_memory_max(void)
{
__u64 ret;
}
EXPORT_SYMBOL(dt_index_read);
-#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)
}
EXPORT_SYMBOL(lprocfs_dt_rd_filesfree);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
};
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
int obd_proc_version_seq_show(struct seq_file *m, void *v)
{
return seq_printf(m, "lustre: %s\nkernel: %s\nbuild: %s\n",
}
return 0;
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
return rc;
}
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
static struct lprocfs_vars lprocfs_llog_test_obd_vars[] = { {0} };
static struct lprocfs_vars lprocfs_llog_test_module_vars[] = { {0} };
static void lprocfs_llog_test_init_vars(struct lprocfs_static_vars *lvars)
}
EXPORT_SYMBOL(lprocfs_write_frac_helper);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
static int lprocfs_no_percpu_stats = 0;
module_param(lprocfs_no_percpu_stats, int, 0644);
static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx)
{
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
struct lprocfs_counter ret;
lprocfs_stats_collect(stats, idx, &ret);
#include "../include/lprocfs_status.h"
#include "../include/obd_class.h"
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
LPROC_SEQ_FOPS_RO_TYPE(echo, uuid);
static struct lprocfs_vars lprocfs_echo_obd_vars[] = {
{ "uuid", &echo_uuid_fops, NULL, 0 },
lvars->module_vars = lprocfs_echo_module_vars;
lvars->obd_vars = lprocfs_echo_obd_vars;
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
int osc_cleanup(struct obd_device *obd);
int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
int lproc_osc_attach_seqstat(struct obd_device *dev);
void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars);
#else
LASSERT(ll_eopcode_table[opcode].opcode == opcode);
return ll_eopcode_table[opcode].opname;
}
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir,
char *name, struct proc_dir_entry **procroot_ret,
struct lprocfs_stats **stats_ret)
}
EXPORT_SYMBOL(lprocfs_wr_pinger_recov);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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
+#if defined (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);
#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 */
int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v);
/* sec_lproc.c */
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
int sptlrpc_lproc_init(void);
void sptlrpc_lproc_fini(void);
#else