Commit e4ba525e authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging/lustre/obd: final removal of procfs stuff

Signed-off-by: default avatarDmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d9528a30
...@@ -61,7 +61,6 @@ ...@@ -61,7 +61,6 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/proc_fs.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/rbtree.h> #include <linux/rbtree.h>
#include <linux/rwsem.h> #include <linux/rwsem.h>
......
obj-$(CONFIG_LUSTRE_FS) += fid.o obj-$(CONFIG_LUSTRE_FS) += fid.o
fid-y := fid_request.o fid_lib.o fid-y := fid_request.o fid_lib.o lproc_fid.o
fid-$(CONFIG_PROC_FS) += lproc_fid.o
obj-$(CONFIG_LUSTRE_FS) += fld.o obj-$(CONFIG_LUSTRE_FS) += fld.o
fld-y := fld_request.o fld_cache.o fld-y := fld_request.o fld_cache.o lproc_fld.o
fld-$(CONFIG_PROC_FS) += lproc_fld.o
...@@ -1480,7 +1480,6 @@ static inline struct dt_thread_info *dt_info(const struct lu_env *env) ...@@ -1480,7 +1480,6 @@ static inline struct dt_thread_info *dt_info(const struct lu_env *env)
int dt_global_init(void); int dt_global_init(void);
void dt_global_fini(void); void dt_global_fini(void);
#if defined (CONFIG_PROC_FS)
int lprocfs_dt_rd_blksize(char *page, char **start, off_t off, int lprocfs_dt_rd_blksize(char *page, char **start, off_t off,
int count, int *eof, void *data); int count, int *eof, void *data);
int lprocfs_dt_rd_kbytestotal(char *page, char **start, off_t off, int lprocfs_dt_rd_kbytestotal(char *page, char **start, off_t off,
...@@ -1493,6 +1492,5 @@ int lprocfs_dt_rd_filestotal(char *page, char **start, off_t off, ...@@ -1493,6 +1492,5 @@ int lprocfs_dt_rd_filestotal(char *page, char **start, off_t off,
int count, int *eof, void *data); int count, int *eof, void *data);
int lprocfs_dt_rd_filesfree(char *page, char **start, off_t off, int lprocfs_dt_rd_filesfree(char *page, char **start, off_t off,
int count, int *eof, void *data); int count, int *eof, void *data);
#endif /* CONFIG_PROC_FS */
#endif /* __LUSTRE_DT_OBJECT_H */ #endif /* __LUSTRE_DT_OBJECT_H */
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/dcache.h> #include <linux/dcache.h>
#include <linux/proc_fs.h>
#include "../obd_class.h" #include "../obd_class.h"
#include "../lustre_net.h" #include "../lustre_net.h"
......
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
#include "../obd_support.h" #include "../obd_support.h"
# include <linux/fs.h> #include <linux/fs.h>
# include <linux/list.h> #include <linux/list.h>
# include <linux/sched.h> /* for struct task_struct, for current.h */ #include <linux/sched.h> /* for struct task_struct, for current.h */
# include <linux/proc_fs.h> #include <linux/mount.h>
# include <linux/mount.h>
#include "../lustre_intent.h" #include "../lustre_intent.h"
struct ll_iattr { struct ll_iattr {
......
...@@ -392,9 +392,6 @@ struct lu_server_seq { ...@@ -392,9 +392,6 @@ struct lu_server_seq {
/* /seq file object device */ /* /seq file object device */
struct dt_object *lss_obj; struct dt_object *lss_obj;
/* Seq related proc */
struct proc_dir_entry *lss_proc_dir;
/* LUSTRE_SEQ_SERVER or LUSTRE_SEQ_CONTROLLER */ /* LUSTRE_SEQ_SERVER or LUSTRE_SEQ_CONTROLLER */
enum lu_mgr_type lss_type; enum lu_mgr_type lss_type;
......
...@@ -70,10 +70,6 @@ struct lu_fld_target { ...@@ -70,10 +70,6 @@ struct lu_fld_target {
}; };
struct lu_server_fld { struct lu_server_fld {
/**
* Fld dir proc entry. */
struct proc_dir_entry *lsf_proc_dir;
/** /**
* /fld file object device */ * /fld file object device */
struct dt_object *lsf_obj; struct dt_object *lsf_obj;
......
...@@ -2952,15 +2952,9 @@ void ptlrpcd_decref(void); ...@@ -2952,15 +2952,9 @@ void ptlrpcd_decref(void);
* @{ * @{
*/ */
const char *ll_opcode2str(__u32 opcode); const char *ll_opcode2str(__u32 opcode);
#if defined (CONFIG_PROC_FS)
void ptlrpc_lprocfs_register_obd(struct obd_device *obd); void ptlrpc_lprocfs_register_obd(struct obd_device *obd);
void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd); void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd);
void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes); void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes);
#else
static inline void ptlrpc_lprocfs_register_obd(struct obd_device *obd) {}
static inline void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd) {}
static inline void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes) {}
#endif
/** @} */ /** @} */
/* ptlrpc/llog_client.c */ /* ptlrpc/llog_client.c */
......
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA
*
* GPL HEADER END
*/
/*
* Copyright (c) 2011, 2012, Intel Corporation.
* Use is subject to license terms.
*/
#ifndef _LUSTRE_QUOTA_H
#define _LUSTRE_QUOTA_H
/** \defgroup quota quota
*
*/
#include <linux/fs.h>
#include <linux/quota.h>
#include <linux/quotaops.h>
#include "dt_object.h"
#include "lustre_fid.h"
#include "lustre_dlm.h"
#ifndef MAX_IQ_TIME
#define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */
#endif
#ifndef MAX_DQ_TIME
#define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */
#endif
struct lquota_id_info;
struct lquota_trans;
/* Gather all quota record type in an union that can be used to read any records
* from disk. All fields of these records must be 64-bit aligned, otherwise the
* OSD layer may swab them incorrectly. */
union lquota_rec {
struct lquota_glb_rec lqr_glb_rec;
struct lquota_slv_rec lqr_slv_rec;
struct lquota_acct_rec lqr_acct_rec;
};
/* Index features supported by the global index objects
* Only used for migration purpose and should be removed once on-disk migration
* is no longer needed */
extern struct dt_index_features dt_quota_iusr_features;
extern struct dt_index_features dt_quota_busr_features;
extern struct dt_index_features dt_quota_igrp_features;
extern struct dt_index_features dt_quota_bgrp_features;
/* Name used in the configuration logs to identify the default metadata pool
* (composed of all the MDTs, with pool ID 0) and the default data pool (all
* the OSTs, with pool ID 0 too). */
#define QUOTA_METAPOOL_NAME "mdt="
#define QUOTA_DATAPOOL_NAME "ost="
/*
* Quota Master Target support
*/
/* Request handlers for quota master operations.
* This is used by the MDT to pass quota/lock requests to the quota master
* target. This won't be needed any more once the QMT is a real target and
* does not rely any more on the MDT service threads and namespace. */
struct qmt_handlers {
/* Handle quotactl request from client. */
int (*qmth_quotactl)(const struct lu_env *, struct lu_device *,
struct obd_quotactl *);
/* Handle dqacq/dqrel request from slave. */
int (*qmth_dqacq)(const struct lu_env *, struct lu_device *,
struct ptlrpc_request *);
/* LDLM intent policy associated with quota locks */
int (*qmth_intent_policy)(const struct lu_env *, struct lu_device *,
struct ptlrpc_request *, struct ldlm_lock **,
int);
/* Initialize LVB of ldlm resource associated with quota objects */
int (*qmth_lvbo_init)(struct lu_device *, struct ldlm_resource *);
/* Update LVB of ldlm resource associated with quota objects */
int (*qmth_lvbo_update)(struct lu_device *, struct ldlm_resource *,
struct ptlrpc_request *, int);
/* Return size of LVB to be packed in ldlm message */
int (*qmth_lvbo_size)(struct lu_device *, struct ldlm_lock *);
/* Fill request buffer with lvb */
int (*qmth_lvbo_fill)(struct lu_device *, struct ldlm_lock *, void *,
int);
/* Free lvb associated with ldlm resource */
int (*qmth_lvbo_free)(struct lu_device *, struct ldlm_resource *);
};
/* actual handlers are defined in lustre/quota/qmt_handler.c */
extern struct qmt_handlers qmt_hdls;
/*
* Quota enforcement support on slaves
*/
struct qsd_instance;
/* The quota slave feature is implemented under the form of a library.
* The API is the following:
*
* - qsd_init(): the user (mostly the OSD layer) should first allocate a qsd
* instance via qsd_init(). This creates all required structures
* to manage quota enforcement for this target and performs all
* low-level initialization which does not involve any lustre
* object. qsd_init() should typically be called when the OSD
* is being set up.
*
* - qsd_prepare(): This sets up on-disk objects associated with the quota slave
* feature and initiates the quota reintegration procedure if
* needed. qsd_prepare() should typically be called when
* ->ldo_prepare is invoked.
*
* - qsd_start(): a qsd instance should be started once recovery is completed
* (i.e. when ->ldo_recovery_complete is called). This is used
* to notify the qsd layer that quota should now be enforced
* again via the qsd_op_begin/end functions. The last step of the
* reintegration procedure (namely usage reconciliation) will be
* completed during start.
*
* - qsd_fini(): is used to release a qsd_instance structure allocated with
* qsd_init(). This releases all quota slave objects and frees the
* structures associated with the qsd_instance.
*
* - qsd_op_begin(): is used to enforce quota, it must be called in the
* declaration of each operation. qsd_op_end() should then be
* invoked later once all operations have been completed in
* order to release/adjust the quota space.
* Running qsd_op_begin() before qsd_start() isn't fatal and
* will return success.
* Once qsd_start() has been run, qsd_op_begin() will block
* until the reintegration procedure is completed.
*
* - qsd_op_end(): performs the post operation quota processing. This must be
* called after the operation transaction stopped.
* While qsd_op_begin() must be invoked each time a new
* operation is declared, qsd_op_end() should be called only
* once for the whole transaction.
*
* - qsd_op_adjust(): triggers pre-acquire/release if necessary.
*
* Below are the function prototypes to be used by OSD layer to manage quota
* enforcement. Arguments are documented where each function is defined. */
struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *,
struct proc_dir_entry *);
int qsd_prepare(const struct lu_env *, struct qsd_instance *);
int qsd_start(const struct lu_env *, struct qsd_instance *);
void qsd_fini(const struct lu_env *, struct qsd_instance *);
int qsd_op_begin(const struct lu_env *, struct qsd_instance *,
struct lquota_trans *, struct lquota_id_info *, int *);
void qsd_op_end(const struct lu_env *, struct qsd_instance *,
struct lquota_trans *);
void qsd_op_adjust(const struct lu_env *, struct qsd_instance *,
union lquota_id *, int);
/* This is exported for the ldiskfs quota migration only,
* see convert_quota_file() */
int lquota_disk_write_glb(const struct lu_env *, struct dt_object *,
__u64, struct lquota_glb_rec *);
/*
* Quota information attached to a transaction
*/
struct lquota_entry;
struct lquota_id_info {
/* quota identifier */
union lquota_id lqi_id;
/* USRQUOTA or GRPQUOTA for now, could be expanded for
* directory quota or other types later. */
int lqi_type;
/* inodes or kbytes to be consumed or released, it could
* be negative when releasing space. */
long long lqi_space;
/* quota slave entry structure associated with this ID */
struct lquota_entry *lqi_qentry;
/* whether we are reporting blocks or inodes */
bool lqi_is_blk;
};
/* Since we enforce only inode quota in meta pool (MDTs), and block quota in
* data pool (OSTs), there are at most 4 quota ids being enforced in a single
* transaction, which is chown transaction:
* original uid and gid, new uid and gid.
*
* This value might need to be revised when directory quota is added. */
#define QUOTA_MAX_TRANSIDS 4
/* all qids involved in a single transaction */
struct lquota_trans {
unsigned short lqt_id_cnt;
struct lquota_id_info lqt_ids[QUOTA_MAX_TRANSIDS];
};
/* flags for quota local enforcement */
#define QUOTA_FL_OVER_USRQUOTA 0x01
#define QUOTA_FL_OVER_GRPQUOTA 0x02
#define QUOTA_FL_SYNC 0x04
#define IS_LQUOTA_RES(res) \
(res->lr_name.name[LUSTRE_RES_ID_SEQ_OFF] == FID_SEQ_QUOTA || \
res->lr_name.name[LUSTRE_RES_ID_SEQ_OFF] == FID_SEQ_QUOTA_GLB)
/* helper function used by MDT & OFD to retrieve quota accounting information
* on slave */
int lquotactl_slv(const struct lu_env *, struct dt_device *,
struct obd_quotactl *);
/** @} quota */
#endif /* _LUSTRE_QUOTA_H */
...@@ -139,14 +139,7 @@ int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg); ...@@ -139,14 +139,7 @@ int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg);
int class_add_uuid(const char *uuid, __u64 nid); int class_add_uuid(const char *uuid, __u64 nid);
/*obdecho*/ /*obdecho*/
#if defined (CONFIG_PROC_FS)
extern void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); extern void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars)
{
memset(lvars, 0, sizeof(*lvars));
}
#endif
#define CFG_F_START 0x01 /* Set when we start updating from a log */ #define CFG_F_START 0x01 /* Set when we start updating from a log */
#define CFG_F_MARKER 0x02 /* We are within a maker */ #define CFG_F_MARKER 0x02 /* We are within a maker */
...@@ -356,7 +349,6 @@ static inline int obd_check_dev_active(struct obd_device *obd) ...@@ -356,7 +349,6 @@ static inline int obd_check_dev_active(struct obd_device *obd)
return rc; return rc;
} }
#if defined (CONFIG_PROC_FS)
#define OBD_COUNTER_OFFSET(op) \ #define OBD_COUNTER_OFFSET(op) \
((offsetof(struct obd_ops, o_ ## op) - \ ((offsetof(struct obd_ops, o_ ## op) - \
offsetof(struct obd_ops, o_iocontrol)) \ offsetof(struct obd_ops, o_iocontrol)) \
...@@ -406,13 +398,6 @@ static inline int obd_check_dev_active(struct obd_device *obd) ...@@ -406,13 +398,6 @@ static inline int obd_check_dev_active(struct obd_device *obd)
(export)->exp_md_stats, coffset); \ (export)->exp_md_stats, coffset); \
} }
#else
#define OBD_COUNTER_OFFSET(op)
#define OBD_COUNTER_INCREMENT(obd, op)
#define EXP_COUNTER_INCREMENT(exp, op)
#define MD_COUNTER_INCREMENT(obd, op)
#define EXP_MD_COUNTER_INCREMENT(exp, op)
#endif
#define OBD_CHECK_MD_OP(obd, op, err) \ #define OBD_CHECK_MD_OP(obd, op, err) \
do { \ do { \
......
...@@ -509,7 +509,6 @@ extern atomic_t libcfs_kmemory; ...@@ -509,7 +509,6 @@ extern atomic_t libcfs_kmemory;
extern void obd_update_maxusage(void); extern void obd_update_maxusage(void);
#if defined (CONFIG_PROC_FS)
#define obd_memory_add(size) \ #define obd_memory_add(size) \
lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size)) lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size))
#define obd_memory_sub(size) \ #define obd_memory_sub(size) \
...@@ -530,46 +529,6 @@ extern void obd_update_maxusage(void); ...@@ -530,46 +529,6 @@ extern void obd_update_maxusage(void);
extern __u64 obd_memory_max(void); extern __u64 obd_memory_max(void);
extern __u64 obd_pages_max(void); extern __u64 obd_pages_max(void);
#else
extern __u64 obd_alloc;
extern __u64 obd_pages;
extern __u64 obd_max_alloc;
extern __u64 obd_max_pages;
static inline void obd_memory_add(long size)
{
obd_alloc += size;
if (obd_alloc > obd_max_alloc)
obd_max_alloc = obd_alloc;
}
static inline void obd_memory_sub(long size)
{
obd_alloc -= size;
}
static inline void obd_pages_add(int order)
{
obd_pages += 1<< order;
if (obd_pages > obd_max_pages)
obd_max_pages = obd_pages;
}
static inline void obd_pages_sub(int order)
{
obd_pages -= 1<< order;
}
#define obd_memory_sum() (obd_alloc)
#define obd_pages_sum() (obd_pages)
#define obd_memory_max() (obd_max_alloc)
#define obd_pages_max() (obd_max_pages)
#endif
#define OBD_DEBUG_MEMUSAGE (1) #define OBD_DEBUG_MEMUSAGE (1)
#if OBD_DEBUG_MEMUSAGE #if OBD_DEBUG_MEMUSAGE
......
...@@ -955,7 +955,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns) ...@@ -955,7 +955,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns)
* proc1: destroy import * proc1: destroy import
* class_disconnect_export(grab cl_sem) -> * class_disconnect_export(grab cl_sem) ->
* -> ldlm_namespace_free -> * -> ldlm_namespace_free ->
* -> lprocfs_remove(grab _lprocfs_lock). * -> ldebugfs_remove(grab _lprocfs_lock).
* proc2: read proc info * proc2: read proc info
* lprocfs_fops_read(grab _lprocfs_lock) -> * lprocfs_fops_read(grab _lprocfs_lock) ->
* -> osc_rd_active, etc(grab cl_sem). * -> osc_rd_active, etc(grab cl_sem).
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
#include <linux/file.h> #include <linux/file.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/proc_fs.h>
#include <linux/sysctl.h> #include <linux/sysctl.h>
# define DEBUG_SUBSYSTEM S_LNET # define DEBUG_SUBSYSTEM S_LNET
......
...@@ -5,7 +5,6 @@ lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ ...@@ -5,7 +5,6 @@ lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \
xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o llite_capa.o \ xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o llite_capa.o \
rw26.o super25.o statahead.o \ rw26.o super25.o statahead.o \
../lclient/glimpse.o ../lclient/lcommon_cl.o ../lclient/lcommon_misc.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 vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o lproc_llite.o
lustre-$(CONFIG_PROC_FS) += lproc_llite.o
llite_lloop-y := lloop.o llite_lloop-y := lloop.o
...@@ -663,7 +663,6 @@ void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar); ...@@ -663,7 +663,6 @@ void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar);
struct ll_ra_read *ll_ra_read_get(struct file *f); struct ll_ra_read *ll_ra_read_get(struct file *f);
/* llite/lproc_llite.c */ /* llite/lproc_llite.c */
#if defined (CONFIG_PROC_FS)
int ldebugfs_register_mountpoint(struct dentry *parent, int ldebugfs_register_mountpoint(struct dentry *parent,
struct super_block *sb, char *osc, char *mdc); struct super_block *sb, char *osc, char *mdc);
void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi); void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi);
...@@ -672,26 +671,6 @@ void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars); ...@@ -672,26 +671,6 @@ void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars);
void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,
struct ll_file_data *file, loff_t pos, struct ll_file_data *file, loff_t pos,
size_t count, int rw); size_t count, int rw);
#else /* CONFIG_PROC_FS */
static inline
int ldebugfs_register_mountpoint(struct dentry *parent,
struct super_block *sb, char *osc, char *mdc)
{ return 0; }
static inline
void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi)
{}
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 /* CONFIG_PROC_FS */
/* llite/dir.c */ /* llite/dir.c */
void ll_release_page(struct page *page, int remove); void ll_release_page(struct page *page, int remove);
......
...@@ -534,7 +534,7 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) ...@@ -534,7 +534,7 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp)
return rc; return rc;
seq = filp->private_data; seq = filp->private_data;
seq->private = inode->i_private ?: PDE_DATA(inode); seq->private = inode->i_private;
return 0; return 0;
} }
......
obj-$(CONFIG_LUSTRE_FS) += lmv.o obj-$(CONFIG_LUSTRE_FS) += lmv.o
lmv-y := lmv_obd.o lmv_intent.o lmv_fld.o lmv-y := lmv_obd.o lmv_intent.o lmv_fld.o lproc_lmv.o
lmv-$(CONFIG_PROC_FS) += lproc_lmv.o
...@@ -144,14 +144,8 @@ struct lmv_tgt_desc ...@@ -144,14 +144,8 @@ struct lmv_tgt_desc
*lmv_locate_mds(struct lmv_obd *lmv, struct md_op_data *op_data, *lmv_locate_mds(struct lmv_obd *lmv, struct md_op_data *op_data,
struct lu_fid *fid); struct lu_fid *fid);
/* lproc_lmv.c */ /* lproc_lmv.c */
#if defined(CONFIG_PROC_FS)
void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars); void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars)
{
memset(lvars, 0, sizeof(*lvars));
}
#endif
extern struct file_operations lmv_proc_target_fops; extern struct file_operations lmv_proc_target_fops;
#endif #endif
...@@ -2,5 +2,4 @@ obj-$(CONFIG_LUSTRE_FS) += lov.o ...@@ -2,5 +2,4 @@ obj-$(CONFIG_LUSTRE_FS) += lov.o
lov-y := lov_obd.o lov_pack.o lov_offset.o lov_merge.o \ lov-y := 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_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 \ lov_lock.o lov_io.o lovsub_dev.o lovsub_object.o lovsub_page.o \
lovsub_lock.o lovsub_io.o lov_pool.o lovsub_lock.o lovsub_io.o lov_pool.o lproc_lov.o
lov-$(CONFIG_PROC_FS) += lproc_lov.o
...@@ -265,15 +265,8 @@ void lsm_free_plain(struct lov_stripe_md *lsm); ...@@ -265,15 +265,8 @@ void lsm_free_plain(struct lov_stripe_md *lsm);
void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm); void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm);
/* lproc_lov.c */ /* lproc_lov.c */
#if defined (CONFIG_PROC_FS)
extern const struct file_operations lov_proc_target_fops; extern const struct file_operations lov_proc_target_fops;
void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars); void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars)
{
memset(lvars, 0, sizeof(*lvars));
}
#endif
/* lov_cl.c */ /* lov_cl.c */
extern struct lu_device_type lov_device_type; extern struct lu_device_type lov_device_type;
......
...@@ -152,7 +152,6 @@ cfs_hash_ops_t pool_hash_operations = { ...@@ -152,7 +152,6 @@ cfs_hash_ops_t pool_hash_operations = {
}; };
#if defined (CONFIG_PROC_FS)
/* ifdef needed for liblustre support */ /* ifdef needed for liblustre support */
/* /*
* pool /proc seq_file methods * pool /proc seq_file methods
...@@ -294,7 +293,6 @@ static struct file_operations pool_proc_operations = { ...@@ -294,7 +293,6 @@ static struct file_operations pool_proc_operations = {
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release,
}; };
#endif /* CONFIG_PROC_FS */
void lov_dump_pool(int level, struct pool_desc *pool) void lov_dump_pool(int level, struct pool_desc *pool)
{ {
......
obj-$(CONFIG_LUSTRE_FS) += mdc.o obj-$(CONFIG_LUSTRE_FS) += mdc.o
mdc-y := mdc_request.o mdc_reint.o mdc_lib.o mdc_locks.o mdc-y := mdc_request.o mdc_reint.o mdc_lib.o mdc_locks.o lproc_mdc.o
mdc-$(CONFIG_PROC_FS) += lproc_mdc.o
...@@ -84,7 +84,7 @@ LUSTRE_RW_ATTR(max_rpcs_in_flight); ...@@ -84,7 +84,7 @@ LUSTRE_RW_ATTR(max_rpcs_in_flight);
static int mdc_kuc_open(struct inode *inode, struct file *file) static int mdc_kuc_open(struct inode *inode, struct file *file)
{ {
return single_open(file, NULL, inode->i_private ?: PDE_DATA(inode)); return single_open(file, NULL, inode->i_private);
} }
/* temporary for testing */ /* temporary for testing */
......
...@@ -40,14 +40,7 @@ ...@@ -40,14 +40,7 @@
#include "../include/lustre_mdc.h" #include "../include/lustre_mdc.h"
#include "../include/lustre_mds.h" #include "../include/lustre_mds.h"
#if defined CONFIG_PROC_FS
void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars); void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars)
{
memset(lvars, 0, sizeof(*lvars));
}
#endif
void mdc_pack_body(struct ptlrpc_request *req, const struct lu_fid *fid, void mdc_pack_body(struct ptlrpc_request *req, const struct lu_fid *fid,
struct obd_capa *oc, __u64 valid, int ea_size, struct obd_capa *oc, __u64 valid, int ea_size,
......
obj-$(CONFIG_LUSTRE_FS) += mgc.o obj-$(CONFIG_LUSTRE_FS) += mgc.o
mgc-y := mgc_request.o mgc-y := mgc_request.o lproc_mgc.o
mgc-$(CONFIG_PROC_FS) += lproc_mgc.o
...@@ -44,19 +44,8 @@ ...@@ -44,19 +44,8 @@
#include "../include/lustre_log.h" #include "../include/lustre_log.h"
#include "../include/lustre_export.h" #include "../include/lustre_export.h"
#if defined (CONFIG_PROC_FS)
void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars); void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars);
int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data); int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data);
#else
static inline void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars)
{
memset(lvars, 0, sizeof(*lvars));
}
static inline int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
{
return 0;
}
#endif /* CONFIG_PROC_FS */
int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld); int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld);
......
...@@ -448,7 +448,6 @@ static int config_log_end(char *logname, struct config_llog_instance *cfg) ...@@ -448,7 +448,6 @@ static int config_log_end(char *logname, struct config_llog_instance *cfg)
return rc; return rc;
} }
#if defined (CONFIG_PROC_FS)
int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data) int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
{ {
struct obd_device *obd = data; struct obd_device *obd = data;
...@@ -477,7 +476,6 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data) ...@@ -477,7 +476,6 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
LPROCFS_CLIMP_EXIT(obd); LPROCFS_CLIMP_EXIT(obd);
return 0; return 0;
} }
#endif
/* reenqueue any lost locks */ /* reenqueue any lost locks */
#define RQ_RUNNING 0x1 #define RQ_RUNNING 0x1
......
...@@ -6,6 +6,4 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \ ...@@ -6,6 +6,4 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \
lustre_handles.o lustre_peer.o \ lustre_handles.o lustre_peer.o \
statfs_pack.o obdo.o obd_config.o obd_mount.o \ statfs_pack.o obdo.o obd_config.o obd_mount.o \
lu_object.o dt_object.o capa.o cl_object.o \ lu_object.o dt_object.o capa.o cl_object.o \
cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o cl_page.o cl_lock.o cl_io.o lu_ref.o acl.o lprocfs_counters.o
obdclass-$(CONFIG_PROC_FS) += lprocfs_counters.o
...@@ -506,15 +506,8 @@ int obd_init_checks(void) ...@@ -506,15 +506,8 @@ int obd_init_checks(void)
return ret; return ret;
} }
#if defined (CONFIG_PROC_FS)
extern int class_procfs_init(void); extern int class_procfs_init(void);
extern int class_procfs_clean(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) static int __init init_obdclass(void)
{ {
...@@ -529,24 +522,22 @@ static int __init init_obdclass(void) ...@@ -529,24 +522,22 @@ static int __init init_obdclass(void)
spin_lock_init(&obd_types_lock); spin_lock_init(&obd_types_lock);
obd_zombie_impexp_init(); obd_zombie_impexp_init();
if (IS_ENABLED(CONFIG_PROC_FS)) { obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM,
obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM, LPROCFS_STATS_FLAG_NONE |
LPROCFS_STATS_FLAG_NONE | LPROCFS_STATS_FLAG_IRQ_SAFE);
LPROCFS_STATS_FLAG_IRQ_SAFE);
if (obd_memory == NULL) { if (obd_memory == NULL) {
CERROR("kmalloc of 'obd_memory' failed\n"); CERROR("kmalloc of 'obd_memory' failed\n");
return -ENOMEM; return -ENOMEM;
}
lprocfs_counter_init(obd_memory, OBD_MEMORY_STAT,
LPROCFS_CNTR_AVGMINMAX,
"memused", "bytes");
lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT,
LPROCFS_CNTR_AVGMINMAX,
"pagesused", "pages");
} }
lprocfs_counter_init(obd_memory, OBD_MEMORY_STAT,
LPROCFS_CNTR_AVGMINMAX,
"memused", "bytes");
lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT,
LPROCFS_CNTR_AVGMINMAX,
"pagesused", "pages");
err = obd_init_checks(); err = obd_init_checks();
if (err == -EOVERFLOW) if (err == -EOVERFLOW)
return err; return err;
...@@ -620,7 +611,6 @@ void obd_update_maxusage(void) ...@@ -620,7 +611,6 @@ void obd_update_maxusage(void)
} }
EXPORT_SYMBOL(obd_update_maxusage); EXPORT_SYMBOL(obd_update_maxusage);
#if defined (CONFIG_PROC_FS)
__u64 obd_memory_max(void) __u64 obd_memory_max(void)
{ {
__u64 ret; __u64 ret;
...@@ -644,7 +634,6 @@ __u64 obd_pages_max(void) ...@@ -644,7 +634,6 @@ __u64 obd_pages_max(void)
return ret; return ret;
} }
EXPORT_SYMBOL(obd_pages_max); EXPORT_SYMBOL(obd_pages_max);
#endif
/* liblustre doesn't call cleanup_obdclass, apparently. we carry on in this /* 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.*/ * ifdef to the end of the file to cover module and versioning goo.*/
......
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
/* fid_be_to_cpu() */ /* fid_be_to_cpu() */
#include "../include/lustre_fid.h" #include "../include/lustre_fid.h"
#include "../include/lustre_quota.h"
/* context key constructor/destructor: dt_global_key_init, dt_global_key_fini */ /* context key constructor/destructor: dt_global_key_init, dt_global_key_fini */
LU_KEY_INIT(dt_global, struct dt_thread_info); LU_KEY_INIT(dt_global, struct dt_thread_info);
LU_KEY_FINI(dt_global, struct dt_thread_info); LU_KEY_FINI(dt_global, struct dt_thread_info);
...@@ -939,8 +937,6 @@ int dt_index_read(const struct lu_env *env, struct dt_device *dev, ...@@ -939,8 +937,6 @@ int dt_index_read(const struct lu_env *env, struct dt_device *dev,
} }
EXPORT_SYMBOL(dt_index_read); EXPORT_SYMBOL(dt_index_read);
#if defined (CONFIG_PROC_FS)
int lprocfs_dt_rd_blksize(char *page, char **start, off_t off, int lprocfs_dt_rd_blksize(char *page, char **start, off_t off,
int count, int *eof, void *data) int count, int *eof, void *data)
{ {
...@@ -1055,5 +1051,3 @@ int lprocfs_dt_rd_filesfree(char *page, char **start, off_t off, ...@@ -1055,5 +1051,3 @@ int lprocfs_dt_rd_filesfree(char *page, char **start, off_t off,
return rc; return rc;
} }
EXPORT_SYMBOL(lprocfs_dt_rd_filesfree); EXPORT_SYMBOL(lprocfs_dt_rd_filesfree);
#endif /* CONFIG_PROC_FS */
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/proc_fs.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/list.h> #include <linux/list.h>
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/proc_fs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/ctype.h> #include <linux/ctype.h>
......
...@@ -221,8 +221,6 @@ int lprocfs_write_frac_helper(const char __user *buffer, unsigned long count, ...@@ -221,8 +221,6 @@ int lprocfs_write_frac_helper(const char __user *buffer, unsigned long count,
} }
EXPORT_SYMBOL(lprocfs_write_frac_helper); EXPORT_SYMBOL(lprocfs_write_frac_helper);
#if defined (CONFIG_PROC_FS)
static int lprocfs_no_percpu_stats; static int lprocfs_no_percpu_stats;
module_param(lprocfs_no_percpu_stats, int, 0644); module_param(lprocfs_no_percpu_stats, int, 0644);
MODULE_PARM_DESC(lprocfs_no_percpu_stats, "Do not alloc percpu data for lprocfs stats"); MODULE_PARM_DESC(lprocfs_no_percpu_stats, "Do not alloc percpu data for lprocfs stats");
...@@ -266,29 +264,6 @@ struct dentry *ldebugfs_add_simple(struct dentry *root, ...@@ -266,29 +264,6 @@ struct dentry *ldebugfs_add_simple(struct dentry *root,
} }
EXPORT_SYMBOL(ldebugfs_add_simple); EXPORT_SYMBOL(ldebugfs_add_simple);
struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root,
char *name, void *data,
struct file_operations *fops)
{
struct proc_dir_entry *proc;
umode_t mode = 0;
if (root == NULL || name == NULL || fops == NULL)
return ERR_PTR(-EINVAL);
if (fops->read)
mode = 0444;
if (fops->write)
mode |= 0200;
proc = proc_create_data(name, mode, root, fops, data);
if (!proc) {
CERROR("LprocFS: No memory to create /proc entry %s", name);
return ERR_PTR(-ENOMEM);
}
return proc;
}
EXPORT_SYMBOL(lprocfs_add_simple);
struct dentry *ldebugfs_add_symlink(const char *name, struct dentry *parent, struct dentry *ldebugfs_add_symlink(const char *name, struct dentry *parent,
const char *format, ...) const char *format, ...)
{ {
...@@ -352,46 +327,6 @@ int ldebugfs_add_vars(struct dentry *parent, ...@@ -352,46 +327,6 @@ int ldebugfs_add_vars(struct dentry *parent,
} }
EXPORT_SYMBOL(ldebugfs_add_vars); EXPORT_SYMBOL(ldebugfs_add_vars);
/**
* Add /proc entries.
*
* \param root [in] The parent proc entry on which new entry will be added.
* \param list [in] Array of proc entries to be added.
* \param data [in] The argument to be passed when entries read/write routines
* are called through /proc file.
*
* \retval 0 on success
* < 0 on error
*/
int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *list,
void *data)
{
if (root == NULL || list == NULL)
return -EINVAL;
while (list->name != NULL) {
struct proc_dir_entry *proc;
umode_t mode = 0;
if (list->proc_mode != 0000) {
mode = list->proc_mode;
} else if (list->fops) {
if (list->fops->read)
mode = 0444;
if (list->fops->write)
mode |= 0200;
}
proc = proc_create_data(list->name, mode, root,
list->fops ?: &lprocfs_generic_fops,
list->data ?: data);
if (proc == NULL)
return -ENOMEM;
list++;
}
return 0;
}
EXPORT_SYMBOL(lprocfs_add_vars);
void ldebugfs_remove(struct dentry **entryp) void ldebugfs_remove(struct dentry **entryp)
{ {
debugfs_remove(*entryp); debugfs_remove(*entryp);
...@@ -399,20 +334,6 @@ void ldebugfs_remove(struct dentry **entryp) ...@@ -399,20 +334,6 @@ void ldebugfs_remove(struct dentry **entryp)
} }
EXPORT_SYMBOL(ldebugfs_remove); EXPORT_SYMBOL(ldebugfs_remove);
void lprocfs_remove(struct proc_dir_entry **rooth)
{
proc_remove(*rooth);
*rooth = NULL;
}
EXPORT_SYMBOL(lprocfs_remove);
void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent)
{
LASSERT(parent != NULL);
remove_proc_entry(name, parent);
}
EXPORT_SYMBOL(lprocfs_remove_proc_entry);
struct dentry *ldebugfs_register(const char *name, struct dentry *ldebugfs_register(const char *name,
struct dentry *parent, struct dentry *parent,
struct lprocfs_vars *list, void *data) struct lprocfs_vars *list, void *data)
...@@ -439,30 +360,6 @@ struct dentry *ldebugfs_register(const char *name, ...@@ -439,30 +360,6 @@ struct dentry *ldebugfs_register(const char *name,
} }
EXPORT_SYMBOL(ldebugfs_register); EXPORT_SYMBOL(ldebugfs_register);
struct proc_dir_entry *lprocfs_register(const char *name,
struct proc_dir_entry *parent,
struct lprocfs_vars *list, void *data)
{
struct proc_dir_entry *entry;
entry = proc_mkdir(name, parent);
if (entry == NULL) {
entry = ERR_PTR(-ENOMEM);
goto out;
}
if (list != NULL) {
int rc = lprocfs_add_vars(entry, list, data);
if (rc != 0) {
lprocfs_remove(&entry);
entry = ERR_PTR(rc);
}
}
out:
return entry;
}
EXPORT_SYMBOL(lprocfs_register);
/* Generic callbacks */ /* Generic callbacks */
int lprocfs_rd_uint(struct seq_file *m, void *data) int lprocfs_rd_uint(struct seq_file *m, void *data)
{ {
...@@ -1337,7 +1234,7 @@ static int lprocfs_stats_seq_open(struct inode *inode, struct file *file) ...@@ -1337,7 +1234,7 @@ static int lprocfs_stats_seq_open(struct inode *inode, struct file *file)
return rc; return rc;
seq = file->private_data; seq = file->private_data;
seq->private = inode->i_private ?: PDE_DATA(inode); seq->private = inode->i_private;
return 0; return 0;
} }
...@@ -1367,21 +1264,6 @@ int ldebugfs_register_stats(struct dentry *parent, const char *name, ...@@ -1367,21 +1264,6 @@ int ldebugfs_register_stats(struct dentry *parent, const char *name,
} }
EXPORT_SYMBOL(ldebugfs_register_stats); EXPORT_SYMBOL(ldebugfs_register_stats);
int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
struct lprocfs_stats *stats)
{
struct proc_dir_entry *entry;
LASSERT(root != NULL);
entry = proc_create_data(name, 0644, root,
&lprocfs_stats_seq_fops, stats);
if (entry == NULL)
return -ENOMEM;
return 0;
}
EXPORT_SYMBOL(lprocfs_register_stats);
void lprocfs_counter_init(struct lprocfs_stats *stats, int index, void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
unsigned conf, const char *name, const char *units) unsigned conf, const char *name, const char *units)
{ {
...@@ -1854,35 +1736,16 @@ int ldebugfs_seq_create(struct dentry *parent, ...@@ -1854,35 +1736,16 @@ int ldebugfs_seq_create(struct dentry *parent,
} }
EXPORT_SYMBOL(ldebugfs_seq_create); EXPORT_SYMBOL(ldebugfs_seq_create);
int lprocfs_seq_create(struct proc_dir_entry *parent, int ldebugfs_obd_seq_create(struct obd_device *dev,
const char *name, const char *name,
umode_t mode, umode_t mode,
const struct file_operations *seq_fops, const struct file_operations *seq_fops,
void *data) void *data)
{
struct proc_dir_entry *entry;
/* Disallow secretly (un)writable entries. */
LASSERT((seq_fops->write == NULL) == ((mode & 0222) == 0));
entry = proc_create_data(name, mode, parent, seq_fops, data);
if (entry == NULL)
return -ENOMEM;
return 0;
}
EXPORT_SYMBOL(lprocfs_seq_create);
int lprocfs_obd_seq_create(struct obd_device *dev,
const char *name,
umode_t mode,
const struct file_operations *seq_fops,
void *data)
{ {
return ldebugfs_seq_create(dev->obd_debugfs_entry, name, return ldebugfs_seq_create(dev->obd_debugfs_entry, name,
mode, seq_fops, data); mode, seq_fops, data);
} }
EXPORT_SYMBOL(lprocfs_obd_seq_create); EXPORT_SYMBOL(ldebugfs_obd_seq_create);
void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value) void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value)
{ {
...@@ -1938,8 +1801,6 @@ int lprocfs_obd_rd_max_pages_per_rpc(struct seq_file *m, void *data) ...@@ -1938,8 +1801,6 @@ int lprocfs_obd_rd_max_pages_per_rpc(struct seq_file *m, void *data)
} }
EXPORT_SYMBOL(lprocfs_obd_rd_max_pages_per_rpc); EXPORT_SYMBOL(lprocfs_obd_rd_max_pages_per_rpc);
#endif
ssize_t lustre_attr_show(struct kobject *kobj, ssize_t lustre_attr_show(struct kobject *kobj,
struct attribute *attr, char *buf) struct attribute *attr, char *buf)
{ {
......
...@@ -1989,14 +1989,10 @@ void lu_global_fini(void) ...@@ -1989,14 +1989,10 @@ void lu_global_fini(void)
static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx) static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx)
{ {
#if defined (CONFIG_PROC_FS)
struct lprocfs_counter ret; struct lprocfs_counter ret;
lprocfs_stats_collect(stats, idx, &ret); lprocfs_stats_collect(stats, idx, &ret);
return (__u32)ret.lc_count; return (__u32)ret.lc_count;
#else
return 0;
#endif
} }
/** /**
......
obj-$(CONFIG_LUSTRE_FS) += osc.o obj-$(CONFIG_LUSTRE_FS) += osc.o
osc-y := osc_request.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_page.o osc_lock.o osc_io.o osc_quota.o osc_cache.o lproc_osc.o
osc-$(CONFIG_PROC_FS) += lproc_osc.o
...@@ -741,8 +741,8 @@ int lproc_osc_attach_seqstat(struct obd_device *dev) ...@@ -741,8 +741,8 @@ int lproc_osc_attach_seqstat(struct obd_device *dev)
rc = ldebugfs_seq_create(dev->obd_debugfs_entry, "osc_stats", 0644, rc = ldebugfs_seq_create(dev->obd_debugfs_entry, "osc_stats", 0644,
&osc_stats_fops, dev); &osc_stats_fops, dev);
if (rc == 0) if (rc == 0)
rc = lprocfs_obd_seq_create(dev, "rpc_stats", 0644, rc = ldebugfs_obd_seq_create(dev, "rpc_stats", 0644,
&osc_rpc_stats_fops, dev); &osc_rpc_stats_fops, dev);
return rc; return rc;
} }
......
...@@ -136,16 +136,8 @@ extern spinlock_t osc_ast_guard; ...@@ -136,16 +136,8 @@ extern spinlock_t osc_ast_guard;
int osc_cleanup(struct obd_device *obd); int osc_cleanup(struct obd_device *obd);
int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg); int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
#if defined (CONFIG_PROC_FS)
int lproc_osc_attach_seqstat(struct obd_device *dev); int lproc_osc_attach_seqstat(struct obd_device *dev);
void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars); void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {return 0;}
static inline void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars)
{
memset(lvars, 0, sizeof(*lvars));
}
#endif
extern struct lu_device_type osc_device_type; extern struct lu_device_type osc_device_type;
......
...@@ -15,6 +15,5 @@ ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o ...@@ -15,6 +15,5 @@ ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o
ptlrpc_objs += sec.o sec_bulk.o sec_gc.o sec_config.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_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o
ptlrpc-y := $(ldlm_objs) $(ptlrpc_objs) ptlrpc-y := $(ldlm_objs) $(ptlrpc_objs) sec_lproc.o
ptlrpc-$(CONFIG_PROC_FS) += sec_lproc.o
ptlrpc-$(CONFIG_LUSTRE_TRANSLATE_ERRNOS) += errno.o ptlrpc-$(CONFIG_LUSTRE_TRANSLATE_ERRNOS) += errno.o
...@@ -256,7 +256,6 @@ ptlrpc_ldebugfs_register(struct dentry *root, char *dir, ...@@ -256,7 +256,6 @@ ptlrpc_ldebugfs_register(struct dentry *root, char *dir,
} }
} }
#if defined(CONFIG_PROC_FS)
static int static int
ptlrpc_lprocfs_req_history_len_seq_show(struct seq_file *m, void *v) ptlrpc_lprocfs_req_history_len_seq_show(struct seq_file *m, void *v)
{ {
...@@ -1237,7 +1236,7 @@ int lprocfs_wr_evict_client(struct file *file, const char __user *buffer, ...@@ -1237,7 +1236,7 @@ int lprocfs_wr_evict_client(struct file *file, const char __user *buffer,
/* Kludge code(deadlock situation): the lprocfs lock has been held /* Kludge code(deadlock situation): the lprocfs lock has been held
* since the client is evicted by writing client's * since the client is evicted by writing client's
* uuid/nid to procfs "evict_client" entry. However, * uuid/nid to procfs "evict_client" entry. However,
* obd_export_evict_by_uuid() will call lprocfs_remove() to destroy * obd_export_evict_by_uuid() will call ldebugfs_remove() to destroy
* the proc entries under the being destroyed export{}, so I have * the proc entries under the being destroyed export{}, so I have
* to drop the lock at first here. * to drop the lock at first here.
* - jay, jxiong@clusterfs.com */ * - jay, jxiong@clusterfs.com */
...@@ -1390,5 +1389,3 @@ int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer, ...@@ -1390,5 +1389,3 @@ int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer,
} }
EXPORT_SYMBOL(lprocfs_wr_pinger_recov); EXPORT_SYMBOL(lprocfs_wr_pinger_recov);
#endif /* CONFIG_PROC_FS */
...@@ -82,16 +82,10 @@ void ptlrpc_sysfs_unregister_service(struct ptlrpc_service *svc); ...@@ -82,16 +82,10 @@ void ptlrpc_sysfs_unregister_service(struct ptlrpc_service *svc);
void ptlrpc_ldebugfs_register_service(struct dentry *debugfs_entry, void ptlrpc_ldebugfs_register_service(struct dentry *debugfs_entry,
struct ptlrpc_service *svc); struct ptlrpc_service *svc);
#if defined(CONFIG_PROC_FS)
void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc); void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc);
void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req, long amount); void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req, long amount);
void ptlrpc_lprocfs_do_request_stat(struct ptlrpc_request *req, void ptlrpc_lprocfs_do_request_stat(struct ptlrpc_request *req,
long q_usec, long work_usec); long q_usec, long work_usec);
#else
#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 /* CONFIG_PROC_FS */
/* NRS */ /* NRS */
...@@ -266,14 +260,8 @@ void sptlrpc_enc_pool_fini(void); ...@@ -266,14 +260,8 @@ void sptlrpc_enc_pool_fini(void);
int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v); int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v);
/* sec_lproc.c */ /* sec_lproc.c */
#if defined(CONFIG_PROC_FS)
int sptlrpc_lproc_init(void); int sptlrpc_lproc_init(void);
void sptlrpc_lproc_fini(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 */ /* sec_gc.c */
int sptlrpc_gc_init(void); int sptlrpc_gc_init(void);
......
...@@ -144,16 +144,16 @@ int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev) ...@@ -144,16 +144,16 @@ int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev)
return -EINVAL; return -EINVAL;
} }
rc = lprocfs_obd_seq_create(dev, "srpc_info", 0444, rc = ldebugfs_obd_seq_create(dev, "srpc_info", 0444,
&sptlrpc_info_lprocfs_fops, dev); &sptlrpc_info_lprocfs_fops, dev);
if (rc) { if (rc) {
CERROR("create proc entry srpc_info for %s: %d\n", CERROR("create proc entry srpc_info for %s: %d\n",
dev->obd_name, rc); dev->obd_name, rc);
return rc; return rc;
} }
rc = lprocfs_obd_seq_create(dev, "srpc_contexts", 0444, rc = ldebugfs_obd_seq_create(dev, "srpc_contexts", 0444,
&sptlrpc_ctxs_lprocfs_fops, dev); &sptlrpc_ctxs_lprocfs_fops, dev);
if (rc) { if (rc) {
CERROR("create proc entry srpc_contexts for %s: %d\n", CERROR("create proc entry srpc_contexts for %s: %d\n",
dev->obd_name, rc); dev->obd_name, rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment