Use struct proc_dir_entry like the rest of the kernel does.
Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
__##name); \
}
-/*
- * Proc file system APIs
- */
-typedef struct proc_dir_entry proc_dir_entry_t;
-
#endif
return (const char *)tar->ft_exp->exp_obd->obd_name;
}
-extern proc_dir_entry_t *fld_type_proc_dir;
+extern struct proc_dir_entry *fld_type_proc_dir;
#endif /* __FLD_INTERNAL_H */
EXPORT_SYMBOL(fld_client_del_target);
#ifdef LPROCFS
-proc_dir_entry_t *fld_type_proc_dir = NULL;
+struct proc_dir_entry *fld_type_proc_dir = NULL;
static int fld_client_proc_init(struct lu_client_fld *fld)
{
#define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE
/* class_obd.c */
-extern proc_dir_entry_t *proc_lustre_root;
+extern struct proc_dir_entry *proc_lustre_root;
struct obd_device;
struct obd_histogram;
struct obd_export;
struct nid_stat;
extern int lprocfs_add_clear_entry(struct obd_device * obd,
- proc_dir_entry_t *entry);
+ struct proc_dir_entry *entry);
extern int lprocfs_exp_setup(struct obd_export *exp,
lnet_nid_t *peer_nid, int *newnid);
extern int lprocfs_exp_cleanup(struct obd_export *exp);
-extern proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root,
+extern struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root,
char *name,
void *data,
struct file_operations *fops);
unsigned long count, void *data);
extern int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data);
-extern int lprocfs_register_stats(proc_dir_entry_t *root, const char *name,
+extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
struct lprocfs_stats *stats);
/* lprocfs_status.c */
-extern int lprocfs_add_vars(proc_dir_entry_t *root,
+extern int lprocfs_add_vars(struct proc_dir_entry *root,
struct lprocfs_vars *var,
void *data);
-extern proc_dir_entry_t *lprocfs_register(const char *name,
- proc_dir_entry_t *parent,
+extern struct proc_dir_entry *lprocfs_register(const char *name,
+ struct proc_dir_entry *parent,
struct lprocfs_vars *list,
void *data);
-extern void lprocfs_remove(proc_dir_entry_t **root);
+extern void lprocfs_remove(struct proc_dir_entry **root);
extern void lprocfs_remove_proc_entry(const char *name,
struct proc_dir_entry *parent);
extern int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list);
extern int lprocfs_obd_cleanup(struct obd_device *obd);
-extern int lprocfs_seq_create(proc_dir_entry_t *parent, const char *name,
+extern int lprocfs_seq_create(struct proc_dir_entry *parent, const char *name,
umode_t mode,
const struct file_operations *seq_fops,
void *data);
{ return; }
static inline void lprocfs_free_stats(struct lprocfs_stats **stats)
{ return; }
-static inline int lprocfs_register_stats(proc_dir_entry_t *root,
+static inline int lprocfs_register_stats(struct proc_dir_entry *root,
const char *name,
struct lprocfs_stats *stats)
{ return 0; }
{ return 0; }
static inline int lprocfs_exp_cleanup(struct obd_export *exp)
{ return 0; }
-static inline proc_dir_entry_t *
+static inline struct proc_dir_entry *
lprocfs_add_simple(struct proc_dir_entry *root, char *name,
void *data, struct file_operations *fops)
{return 0; }
int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data)
{ return 0; }
-static inline proc_dir_entry_t *
-lprocfs_register(const char *name, proc_dir_entry_t *parent,
+static inline struct proc_dir_entry *
+lprocfs_register(const char *name, struct proc_dir_entry *parent,
struct lprocfs_vars *list, void *data)
{ return NULL; }
-static inline int lprocfs_add_vars(proc_dir_entry_t *root,
+static inline int lprocfs_add_vars(struct proc_dir_entry *root,
struct lprocfs_vars *var,
void *data)
{ return 0; }
-static inline void lprocfs_remove(proc_dir_entry_t **root)
+static inline void lprocfs_remove(struct proc_dir_entry **root)
{ return; }
static inline void lprocfs_remove_proc_entry(const char *name,
struct proc_dir_entry *parent)
*/
struct ldlm_pool {
/** Pool proc directory. */
- proc_dir_entry_t *pl_proc_dir;
+ struct proc_dir_entry *pl_proc_dir;
/** Pool name, must be long enough to hold compound proc entry name. */
char pl_name[100];
/** Lock for protecting SLV/CLV updates. */
struct lu_seq_range lcs_space;
/* Seq related proc */
- proc_dir_entry_t *lcs_proc_dir;
+ struct proc_dir_entry *lcs_proc_dir;
/* This holds last allocated fid in last obtained seq */
struct lu_fid lcs_fid;
struct dt_object *lss_obj;
/* Seq related proc */
- proc_dir_entry_t *lss_proc_dir;
+ struct proc_dir_entry *lss_proc_dir;
/* LUSTRE_SEQ_SERVER or LUSTRE_SEQ_CONTROLLER */
enum lu_mgr_type lss_type;
struct lu_server_fld {
/**
* Fld dir proc entry. */
- proc_dir_entry_t *lsf_proc_dir;
+ struct proc_dir_entry *lsf_proc_dir;
/**
* /fld file object device */
struct lu_client_fld {
/**
* Client side proc entry. */
- proc_dir_entry_t *lcf_proc_dir;
+ struct proc_dir_entry *lcf_proc_dir;
/**
* List of exports client FLD knows about. */
/** limit of threads number for each partition */
int srv_nthrs_cpt_limit;
/** Root of /proc dir tree for this service */
- proc_dir_entry_t *srv_procroot;
+ struct proc_dir_entry *srv_procroot;
/** Pointer to statistic data for this service */
struct lprocfs_stats *srv_stats;
/** # hp per lp reqs to handle */
* enforcement. Arguments are documented where each function is defined. */
struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *,
- proc_dir_entry_t *);
+ 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 *);
struct list_head typ_chain;
struct obd_ops *typ_dt_ops;
struct md_ops *typ_md_ops;
- proc_dir_entry_t *typ_procroot;
+ struct proc_dir_entry *typ_procroot;
char *typ_name;
int typ_refcnt;
struct lu_device_type *typ_lu;
struct lov_qos_rr pool_rr; /* round robin qos */
struct hlist_node pool_hash; /* access by poolname */
struct list_head pool_list; /* serial access */
- proc_dir_entry_t *pool_proc_entry; /* file in /proc */
+ struct proc_dir_entry *pool_proc_entry; /* file in /proc */
struct obd_device *pool_lobd; /* obd of the lov/lod to which
* this pool belongs */
};
int lov_pool_count;
cfs_hash_t *lov_pools_hash_body; /* used for key access */
struct list_head lov_pool_list; /* used for sequential access */
- proc_dir_entry_t *lov_pool_proc_entry;
+ struct proc_dir_entry *lov_pool_proc_entry;
enum lustre_sec_part lov_sp_me;
/* Cached LRU pages from upper layer */
unsigned int md_cntr_base;
struct lprocfs_stats *md_stats;
- proc_dir_entry_t *obd_proc_entry;
+ struct proc_dir_entry *obd_proc_entry;
void *obd_proc_private; /* type private PDEs */
- proc_dir_entry_t *obd_proc_exports_entry;
- proc_dir_entry_t *obd_svc_procroot;
+ struct proc_dir_entry *obd_proc_exports_entry;
+ struct proc_dir_entry *obd_svc_procroot;
struct lprocfs_stats *obd_svc_stats;
atomic_t obd_evict_inprogress;
wait_queue_head_t obd_evict_inprogress_waitq;
void l_check_ns_lock(struct ldlm_namespace *ns);
void l_check_no_ns_lock(struct ldlm_namespace *ns);
-extern proc_dir_entry_t *ldlm_svc_proc_dir;
-extern proc_dir_entry_t *ldlm_type_proc_dir;
+extern struct proc_dir_entry *ldlm_svc_proc_dir;
+extern struct proc_dir_entry *ldlm_type_proc_dir;
struct ldlm_state {
struct ptlrpc_service *ldlm_cb_service;
*/
#define LDLM_POOL_SLV_SHIFT (10)
-extern proc_dir_entry_t *ldlm_ns_proc_dir;
+extern struct proc_dir_entry *ldlm_ns_proc_dir;
static inline __u64 dru(__u64 val, __u32 shift, int round_up)
{
/* Client namespaces that don't have any locks in them */
LIST_HEAD(ldlm_cli_inactive_namespace_list);
-proc_dir_entry_t *ldlm_type_proc_dir = NULL;
-proc_dir_entry_t *ldlm_ns_proc_dir = NULL;
-proc_dir_entry_t *ldlm_svc_proc_dir = NULL;
+struct proc_dir_entry *ldlm_type_proc_dir = NULL;
+struct proc_dir_entry *ldlm_ns_proc_dir = NULL;
+struct proc_dir_entry *ldlm_svc_proc_dir = NULL;
extern unsigned int ldlm_cancel_unused_locks_before_replay;
{
struct lprocfs_vars lock_vars[2];
char lock_name[MAX_STRING_SIZE + 1];
- proc_dir_entry_t *ns_pde;
+ struct proc_dir_entry *ns_pde;
LASSERT(ns != NULL);
LASSERT(ns->ns_rs_hash != NULL);
struct lustre_sb_info *lsi = s2lsi(sb);
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
- proc_dir_entry_t *dir;
+ struct proc_dir_entry *dir;
char name[MAX_STRING_SIZE + 1], *ptr;
int err, id, len, rc;
}
if (obd->obd_proc_private)
- lprocfs_remove((proc_dir_entry_t **)&obd->obd_proc_private);
+ lprocfs_remove((struct proc_dir_entry **)&obd->obd_proc_private);
else
CERROR("/proc/fs/lustre/%s/%s/target_obds missing\n",
obd->obd_type->typ_name, obd->obd_name);
struct obd_device *tgt_obd;
static struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" };
struct obd_import *imp;
- proc_dir_entry_t *lov_proc_dir;
+ struct proc_dir_entry *lov_proc_dir;
int rc;
if (!lov->lov_tgts[index])
lov_proc_dir = obd->obd_proc_private;
if (lov_proc_dir) {
struct obd_device *osc_obd = lov->lov_tgts[index]->ltd_exp->exp_obd;
- proc_dir_entry_t *osc_symlink;
+ struct proc_dir_entry *osc_symlink;
LASSERT(osc_obd != NULL);
LASSERT(osc_obd->obd_magic == OBD_DEVICE_MAGIC);
static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt)
{
- proc_dir_entry_t *lov_proc_dir;
+ struct proc_dir_entry *lov_proc_dir;
struct lov_obd *lov = &obd->u.lov;
struct obd_device *osc_obd;
int rc;
/* lprocfs API calls */
-proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root,
+struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root,
char *name, void *data,
struct file_operations *fops)
{
- proc_dir_entry_t *proc;
+ struct proc_dir_entry *proc;
umode_t mode = 0;
if (root == NULL || name == NULL || fops == NULL)
{
struct nid_stat *new_stat, *old_stat;
struct obd_device *obd = NULL;
- proc_dir_entry_t *entry;
+ struct proc_dir_entry *entry;
char *buffer = NULL;
int rc = 0;
}
EXPORT_SYMBOL(lprocfs_find_named_value);
-int lprocfs_seq_create(proc_dir_entry_t *parent,
+int lprocfs_seq_create(struct proc_dir_entry *parent,
const char *name,
umode_t mode,
const struct file_operations *seq_fops,
*/
struct ptlrpc_service *
ptlrpc_register_service(struct ptlrpc_service_conf *conf,
- proc_dir_entry_t *proc_entry)
+ struct proc_dir_entry *proc_entry)
{
struct ptlrpc_service_cpt_conf *cconf = &conf->psc_cpt;
struct ptlrpc_service *service;