#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;
#define LPROCFS_WRITE_EXIT() do {} while(0)
# endif /* !HAVE_ONLY_PROCFS_SEQ */
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#endif /* __PARAMS_TREE_H__ */
static int seq_server_proc_init(struct lu_server_seq *seq)
{
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
int rc;
ENTRY;
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))
seq->lss_proc_dir = NULL;
}
EXIT;
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
}
int seq_server_init(const struct lu_env *env,
extern struct lu_context_key seq_thread_key;
-# ifdef LPROCFS
+# ifdef CONFIG_PROC_FS
extern struct lprocfs_seq_vars seq_server_proc_list[];
# endif
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
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))
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;
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,
#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))
.fops = &lprocfs_client_fid_fid_fops },
{ NULL }
};
-#endif
+
+#endif /* CONFIG_PROC_FS */
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;
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
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
}
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;
}
EXIT;
}
-#else /* LPROCFS */
+#else /* !CONFIG_PROC_FS */
static int fld_client_proc_init(struct lu_client_fld *fld)
{
return 0;
{
return;
}
-#endif /* !LPROCFS */
+#endif /* CONFIG_PROC_FS */
EXPORT_SYMBOL(fld_client_proc_fini);
#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)
{
# endif /* HAVE_SERVER_SUPPORT */
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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 */
time_t ojs_last_cleanup;
};
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats,
unsigned int cpuid);
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
/* lproc_ptlrpc.c */
#define target_print_req NULL
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#endif /* LPROCFS_SNMP_H */
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) {}
* @{
*/
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);
} 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)) \
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) \
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;
#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)
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)) {
* 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)
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)
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);
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;
}
LPROC_SEQ_FOPS(ll_rw_offset_stats);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
*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;
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);
#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
.llseek = seq_lseek,
.release = seq_release,
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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,
* called by Linux kernel's procfs.
*/
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
/**
* Show default stripe size.
lprocfs_obd_cleanup(obd);
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
/* 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
{
struct lov_desc *desc;
struct lov_obd *lov = &obd->u.lov;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
struct obd_type *type;
#endif
int rc;
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
};
-#ifdef LPROCFS
+#ifdef 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
+#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);
#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;
.llseek = seq_lseek,
.release = lprocfs_seq_release,
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#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)
{
.fops = &mdc_pinger_recov_fops },
{ NULL }
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#include <lustre_mdc.h>
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
extern struct lprocfs_seq_vars lprocfs_mdc_obd_vars[];
#endif
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);
#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);
.fops = &mgc_ir_state_fops },
{ NULL }
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#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);
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;
GOTO(err_cleanup, rc);
}
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
obd->obd_vars = lprocfs_mgc_obd_vars;
lprocfs_obd_setup(obd);
#endif
#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)
{
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);
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
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
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);
}
EXPORT_SYMBOL(obd_update_maxusage);
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
__u64 obd_memory_max(void)
{
__u64 ret;
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.*/
}
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;
}
EXPORT_SYMBOL(lprocfs_dt_filesfree_seq_show);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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,
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,
* 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);
};
-#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",
};
#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)
{
#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;
lprocfs_stats_unlock(stats, LPROCFS_GET_SMP_ID, &flags);
}
EXPORT_SYMBOL(lprocfs_counter_sub);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
#include <lprocfs_status.h>
#include <lustre/lustre_idl.h>
-#if defined(LPROCFS)
+#ifdef CONFIG_PROC_FS
/*
* JobID formats & JobID environment variable names for supported
return count;
}
EXPORT_SYMBOL(lprocfs_job_interval_seq_write);
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/
#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,
}
EXPORT_SYMBOL(lprocfs_wr_nosquash_nids);
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/
#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)
{
}
EXPORT_SYMBOL(lprocfs_target_instance_seq_show);
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/
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);
}
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)
{
.release = lu_ref_seq_release
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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);
}
#include "ofd_internal.h"
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
/**
* Show number of FID allocation sequences.
0, "quotactl", "reqs");
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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
#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;
return rc;
}
-#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
+#ifdef CONFIG_PROC_FS
extern struct lprocfs_seq_vars lprocfs_osc_obd_vars[];
int lproc_osc_attach_seqstat(struct obd_device *dev);
#else
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
* osd dev stats
*/
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
enum {
LPROC_OSD_READ_BYTES = 0,
LPROC_OSD_WRITE_BYTES = 1,
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[];
#include "osd_internal.h"
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
void osd_brw_stats_update(struct osd_device *osd, struct osd_iobuf *iobuf)
{
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,
#include "osd_internal.h"
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
#define pct(a, b) (b ? a * 100 / b : 0)
#include "osp_internal.h"
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
/**
* Show OSP active status
*
obd->obd_name);
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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[] = {
.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)
int rc;
ENTRY;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
obd->obd_vars = lprocfs_ost_obd_vars;
lprocfs_obd_setup(obd);
#endif
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)
}
EXPORT_SYMBOL(lprocfs_pinger_recov_seq_write);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
libcfs_id2str(req->rq_peer), nrq->nr_u.crr.cr_round);
}
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
/**
* lprocfs interface
lprocfs_remove_proc_entry("nrs_crrn_quantum", svc->srv_procroot);
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
/**
* CRR-N policy operations
.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
* lprocfs interface
*/
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
/**
* This allows to bundle the policy name into the lprocfs_vars::data pointer
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,
.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
* 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)
{
lprocfs_remove_proc_entry("nrs_trr_supported", svc->srv_procroot);
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
/**
* Reuse much of the ORR functionality for TRR.
.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
nrq->nr_u.tbf.tr_sequence);
}
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
/**
* lprocfs interface
lprocfs_remove_proc_entry("nrs_tbf_rule", svc->srv_procroot);
}
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
/**
* TBF policy operations
.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
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);
#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 */
#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 */
.llseek = seq_lseek,
.release = lprocfs_quota_seq_release,
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
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));