Whamcloud - gitweb
LU-5275 libcfs: cleanup the proc hash and cfs wrappers 43/11743/3
authorJames Simmons <uja.ornl@gmail.com>
Wed, 3 Sep 2014 16:40:20 +0000 (12:40 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 11 Sep 2014 19:30:43 +0000 (19:30 +0000)
Remove the non seq file version of the cfs_hash functions.
Remove the basic cfs wrappers for procfs definations.

Change-Id: Ie4996656267998b78e44cdedfbf972f358e04d50
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11743
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
22 files changed:
libcfs/include/libcfs/libcfs_hash.h
libcfs/include/libcfs/linux/linux-prim.h
libcfs/include/libcfs/params_tree.h
libcfs/include/libcfs/user-prim.h
libcfs/libcfs/hash.c
lustre/doc/osd-api.txt
lustre/include/lprocfs_status.h
lustre/include/lustre_fid.h
lustre/include/lustre_fld.h
lustre/include/lustre_net.h
lustre/include/lustre_quota.h
lustre/lod/lod_internal.h
lustre/mdd/mdd_internal.h
lustre/mdt/mdt_mds.c
lustre/mgs/mgs_internal.h
lustre/obdclass/lprocfs_status_server.c
lustre/ofd/ofd_dev.c
lustre/osd-zfs/osd_internal.h
lustre/osp/osp_internal.h
lustre/quota/qmt_internal.h
lustre/quota/qsd_internal.h
lustre/quota/qsd_lib.c

index 3104173..9b7e7f4 100644 (file)
@@ -830,13 +830,9 @@ static inline void __cfs_hash_set_theta(cfs_hash_t *hs, int min, int max)
 }
 
 /* Generic debug formatting routines mainly for proc handler */
-#ifndef HAVE_ONLY_PROCFS_SEQ
-int cfs_hash_debug_header(char *str, int size);
-int cfs_hash_debug_str(cfs_hash_t *hs, char *str, int size);
-#endif
 struct seq_file;
-int cfs_hash_debug_header_seq(struct seq_file *m);
-int cfs_hash_debug_str_seq(cfs_hash_t *hs, struct seq_file *m);
+int cfs_hash_debug_header(struct seq_file *m);
+int cfs_hash_debug_str(cfs_hash_t *hs, struct seq_file *m);
 
 /*
  * Generic djb2 hash algorithm for character arrays.
index 4c27905..9622b63 100644 (file)
@@ -96,14 +96,6 @@ LL_PROC_PROTO(name)                                     \
 }
 
 /*
- * Proc file system APIs
- */
-typedef struct proc_dir_entry           cfs_proc_dir_entry_t;
-#define cfs_create_proc_entry(n, m, p)  create_proc_entry(n, m, p)
-#define cfs_free_proc_entry(e)          free_proc_entry(e)
-#define cfs_remove_proc_entry(n, e)     remove_proc_entry(n, e)
-
-/*
  * Wait Queue
  */
 
index 0bfbdf7..92bd566 100644 (file)
 #endif
 
 #ifdef LPROCFS
-typedef struct inode                            cfs_inode_t;
-typedef struct file_operations                  cfs_param_file_ops_t;
-typedef struct proc_dir_entry                   cfs_param_dentry_t;
-typedef struct poll_table_struct                cfs_poll_table_t;
-#define CFS_PARAM_MODULE                        THIS_MODULE
-#define cfs_file_private(file)                  (file->private_data)
-
 #ifndef HAVE_ONLY_PROCFS_SEQ
 /* in lprocfs_stat.c, to protect the private data for proc entries */
 extern struct rw_semaphore             _lprocfs_lock;
@@ -96,13 +89,13 @@ do {                                        \
 
 #else /* New proc api */
 
-static inline cfs_param_dentry_t* PDE(struct inode *inode)
+static inline struct proc_dir_entry *PDE(struct inode *inode)
 {
        return NULL;
 }
 
 static inline
-int LPROCFS_ENTRY_CHECK(cfs_param_dentry_t *dp)
+int LPROCFS_ENTRY_CHECK(struct proc_dir_entry *dp)
 {
        return 0;
 }
@@ -120,18 +113,22 @@ struct file {
        unsigned int    param_flags;
 };
 
-typedef struct cfs_param_inode {
-       void    *param_private;
-} cfs_inode_t;
+struct inode {
+       void            *param_private;
+};
 
-typedef struct cfs_param_dentry {
-       void *param_data;
-} cfs_param_dentry_t;
+struct poll_table_struct {
+       void            *pad;
+};
 
-typedef struct cfs_proc_inode {
-       cfs_param_dentry_t      *param_pde;
-       cfs_inode_t             param_inode;
-} cfs_proc_inode_t;
+struct proc_dir_entry {
+       void            *param_data;
+};
+
+struct proc_inode {
+       struct proc_dir_entry   *param_pde;
+       struct inode            param_inode;
+};
 
 struct seq_operations;
 struct seq_file {
@@ -153,21 +150,7 @@ struct seq_operations {
        int   (*show) (struct seq_file *m, void *v);
 };
 
-typedef void *cfs_poll_table_t;
-
-typedef struct cfs_param_file_ops {
-       struct module   *owner;
-       int (*open) (cfs_inode_t *, struct file *);
-       loff_t (*llseek)(struct file *, loff_t, int);
-       int (*release) (cfs_inode_t *, struct file *);
-       unsigned int (*poll) (struct file *, cfs_poll_table_t *);
-       ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
-       ssize_t (*read)(struct file *, char *, size_t, loff_t *);
-} cfs_param_file_ops_t;
-typedef cfs_param_file_ops_t *cfs_lproc_filep_t;
-
-#define CFS_PARAM_MODULE       NULL
-#define seq_lseek              NULL
+#define seq_lseek      NULL
 
 static inline int seq_read(char *buf, size_t count, loff_t *ppos)
 {
@@ -191,18 +174,18 @@ seq_open(struct file *file, const struct seq_operations *fops)
        return 0;
 }
 
-static inline cfs_proc_inode_t *FAKE_PROC_I(const cfs_inode_t *inode)
+static inline struct proc_inode *FAKE_PROC_I(const struct inode *inode)
 {
-       return container_of(inode, cfs_proc_inode_t, param_inode);
+       return container_of(inode, struct proc_inode, param_inode);
 }
 
-static inline cfs_param_dentry_t *PDE(cfs_inode_t *inode)
+static inline struct proc_dir_entry *PDE(struct inode *inode)
 {
        return FAKE_PROC_I(inode)->param_pde;
 }
 
 static inline
-int LPROCFS_ENTRY_CHECK(cfs_param_dentry_t *dp)
+int LPROCFS_ENTRY_CHECK(struct proc_dir_entry *dp)
 {
        return 0;
 }
index d1a27ad..9ec0e77 100644 (file)
@@ -55,8 +55,6 @@
 # define EXPORT_SYMBOL(s)
 #endif
 
-typedef struct proc_dir_entry           cfs_proc_dir_entry_t;
-
 /*
  * Just present a single processor until will add thread support.
  */
index b637760..9f01b6d 100644 (file)
@@ -2029,19 +2029,7 @@ void cfs_hash_rehash_key(cfs_hash_t *hs, const void *old_key,
 }
 EXPORT_SYMBOL(cfs_hash_rehash_key);
 
-#ifndef HAVE_ONLY_PROCFS_SEQ
-int cfs_hash_debug_header(char *str, int size)
-{
-        return snprintf(str, size, "%-*s%6s%6s%6s%6s%6s%6s%6s%7s%8s%8s%8s%s\n",
-                 CFS_HASH_BIGNAME_LEN,
-                 "name", "cur", "min", "max", "theta", "t-min", "t-max",
-                 "flags", "rehash", "count", "maxdep", "maxdepb",
-                 " distribution");
-}
-EXPORT_SYMBOL(cfs_hash_debug_header);
-#endif
-
-int cfs_hash_debug_header_seq(struct seq_file *m)
+int cfs_hash_debug_header(struct seq_file *m)
 {
        return seq_printf(m, "%-*s%6s%6s%6s%6s%6s%6s%6s%7s%8s%8s%8s%s\n",
                        CFS_HASH_BIGNAME_LEN,
@@ -2049,7 +2037,7 @@ int cfs_hash_debug_header_seq(struct seq_file *m)
                        "flags", "rehash", "count", "maxdep", "maxdepb",
                        " distribution");
 }
-EXPORT_SYMBOL(cfs_hash_debug_header_seq);
+EXPORT_SYMBOL(cfs_hash_debug_header);
 
 static cfs_hash_bucket_t **
 cfs_hash_full_bkts(cfs_hash_t *hs)
@@ -2075,84 +2063,7 @@ cfs_hash_full_nbkt(cfs_hash_t *hs)
                CFS_HASH_RH_NBKT(hs) : CFS_HASH_NBKT(hs);
 }
 
-#ifndef HAVE_ONLY_PROCFS_SEQ
-int cfs_hash_debug_str(cfs_hash_t *hs, char *str, int size)
-{
-        int                    dist[8] = { 0, };
-        int                    maxdep  = -1;
-        int                    maxdepb = -1;
-        int                    total   = 0;
-        int                    c       = 0;
-        int                    theta;
-        int                    i;
-
-        if (str == NULL || size == 0)
-                return 0;
-
-        cfs_hash_lock(hs, 0);
-        theta = __cfs_hash_theta(hs);
-
-        c += snprintf(str + c, size - c, "%-*s ",
-                      CFS_HASH_BIGNAME_LEN, hs->hs_name);
-        c += snprintf(str + c, size - c, "%5d ",  1 << hs->hs_cur_bits);
-        c += snprintf(str + c, size - c, "%5d ",  1 << hs->hs_min_bits);
-        c += snprintf(str + c, size - c, "%5d ",  1 << hs->hs_max_bits);
-        c += snprintf(str + c, size - c, "%d.%03d ",
-                      __cfs_hash_theta_int(theta),
-                      __cfs_hash_theta_frac(theta));
-        c += snprintf(str + c, size - c, "%d.%03d ",
-                      __cfs_hash_theta_int(hs->hs_min_theta),
-                      __cfs_hash_theta_frac(hs->hs_min_theta));
-        c += snprintf(str + c, size - c, "%d.%03d ",
-                      __cfs_hash_theta_int(hs->hs_max_theta),
-                      __cfs_hash_theta_frac(hs->hs_max_theta));
-        c += snprintf(str + c, size - c, " 0x%02x ", hs->hs_flags);
-        c += snprintf(str + c, size - c, "%6d ", hs->hs_rehash_count);
-
-        /*
-         * The distribution is a summary of the chained hash depth in
-         * each of the libcfs hash buckets.  Each buckets hsb_count is
-         * divided by the hash theta value and used to generate a
-         * histogram of the hash distribution.  A uniform hash will
-         * result in all hash buckets being close to the average thus
-         * only the first few entries in the histogram will be non-zero.
-         * If you hash function results in a non-uniform hash the will
-         * be observable by outlier bucks in the distribution histogram.
-         *
-         * Uniform hash distribution:      128/128/0/0/0/0/0/0
-         * Non-Uniform hash distribution:  128/125/0/0/0/0/2/1
-         */
-        for (i = 0; i < cfs_hash_full_nbkt(hs); i++) {
-                cfs_hash_bd_t  bd;
-
-                bd.bd_bucket = cfs_hash_full_bkts(hs)[i];
-                cfs_hash_bd_lock(hs, &bd, 0);
-                if (maxdep < bd.bd_bucket->hsb_depmax) {
-                        maxdep  = bd.bd_bucket->hsb_depmax;
-#ifdef __KERNEL__
-                       maxdepb = ffz(~maxdep);
-#endif
-                }
-                total += bd.bd_bucket->hsb_count;
-                dist[min(fls(bd.bd_bucket->hsb_count/max(theta,1)),7)]++;
-                cfs_hash_bd_unlock(hs, &bd, 0);
-        }
-
-        c += snprintf(str + c, size - c, "%7d ", total);
-        c += snprintf(str + c, size - c, "%7d ", maxdep);
-        c += snprintf(str + c, size - c, "%7d ", maxdepb);
-        for (i = 0; i < 8; i++)
-                c += snprintf(str + c, size - c, "%d%c",  dist[i],
-                              (i == 7) ? '\n' : '/');
-
-        cfs_hash_unlock(hs, 0);
-
-        return c;
-}
-EXPORT_SYMBOL(cfs_hash_debug_str);
-#endif
-
-int cfs_hash_debug_str_seq(cfs_hash_t *hs, struct seq_file *m)
+int cfs_hash_debug_str(cfs_hash_t *hs, struct seq_file *m)
 {
        int     dist[8] = { 0, };
        int     maxdep  = -1;
@@ -2216,4 +2127,4 @@ int cfs_hash_debug_str_seq(cfs_hash_t *hs, struct seq_file *m)
        cfs_hash_unlock(hs, 0);
        return c;
 }
-EXPORT_SYMBOL(cfs_hash_debug_str_seq);
+EXPORT_SYMBOL(cfs_hash_debug_str);
index 340a255..7a77710 100644 (file)
@@ -1203,7 +1203,7 @@ The latter two actions are known as reconciliation.
 The QSD API is defined in lustre/include/lustre_quota.h as follows:
 
 struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *,
-                              cfs_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 *);
index bec768d..7db1275 100644 (file)
@@ -371,7 +371,7 @@ enum {
 
 #define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE
 /* class_obd.c */
-extern cfs_proc_dir_entry_t *proc_lustre_root;
+extern struct proc_dir_entry *proc_lustre_root;
 
 struct obd_device;
 struct obd_histogram;
@@ -588,7 +588,7 @@ extern void lprocfs_free_md_stats(struct obd_device *obddev);
 struct obd_export;
 struct nid_stat;
 extern int lprocfs_add_clear_entry(struct obd_device * obd,
-                                   cfs_proc_dir_entry_t *entry);
+                                  struct proc_dir_entry *entry);
 #ifdef HAVE_SERVER_SUPPORT
 extern int lprocfs_exp_setup(struct obd_export *exp,
                              lnet_nid_t *peer_nid, int *newnid);
@@ -610,35 +610,35 @@ lprocfs_nid_stats_clear_seq_write(struct file *file, const char *buffer,
                                        size_t count, loff_t *off);
 extern int lprocfs_nid_stats_clear_seq_show(struct seq_file *file, void *data);
 #endif
-extern int lprocfs_register_stats(cfs_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 */
 #ifndef HAVE_ONLY_PROCFS_SEQ
-extern int lprocfs_add_vars(cfs_proc_dir_entry_t *root,
+extern int lprocfs_add_vars(struct proc_dir_entry *root,
                             struct lprocfs_vars *var,
                             void *data);
 
-extern cfs_proc_dir_entry_t *lprocfs_register(const char *name,
-                                             cfs_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);
 #endif
-extern int lprocfs_seq_add_vars(cfs_proc_dir_entry_t *root,
+extern int lprocfs_seq_add_vars(struct proc_dir_entry *root,
                                struct lprocfs_seq_vars *var,
                                void *data);
 
-extern cfs_proc_dir_entry_t *
-lprocfs_seq_register(const char *name, cfs_proc_dir_entry_t *parent,
+extern struct proc_dir_entry *
+lprocfs_seq_register(const char *name, struct proc_dir_entry *parent,
                     struct lprocfs_seq_vars *list, void *data);
-extern void lprocfs_remove(cfs_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);
 #ifndef HAVE_ONLY_PROCFS_SEQ
 extern void lprocfs_try_remove_proc_entry(const char *name,
                                          struct proc_dir_entry *parent);
 
-extern cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *root,
+extern struct proc_dir_entry *lprocfs_srch(struct proc_dir_entry *root,
                                           const char *name);
 #endif
 extern int lprocfs_obd_setup(struct obd_device *dev);
@@ -747,8 +747,8 @@ ssize_t
 lprocfs_ir_factor_seq_write(struct file *file, const char *buffer,
                                size_t count, loff_t *off);
 #endif
-extern int lprocfs_single_release(cfs_inode_t *, struct file *);
-extern int lprocfs_seq_release(cfs_inode_t *, struct file *);
+extern int lprocfs_single_release(struct inode *, struct file *);
+extern int lprocfs_seq_release(struct inode *, struct file *);
 
 /* You must use these macros when you want to refer to
  * the import in a client obd_device for a lprocfs entry */
@@ -768,7 +768,7 @@ extern int lprocfs_seq_release(cfs_inode_t *, struct file *);
   a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally,
   call lprocfs_obd_seq_create(obd, filename, 0444, &name#_fops, data); */
 #define __LPROC_SEQ_FOPS(name, custom_seq_write)                       \
-static int name##_single_open(cfs_inode_t *inode, struct file *file)   \
+static int name##_single_open(struct inode *inode, struct file *file)  \
 {                                                                      \
        LPROCFS_ENTRY_CHECK(PDE(inode));                                \
        return single_open(file, name##_seq_show, PDE_DATA(inode));     \
@@ -810,9 +810,9 @@ struct file_operations name##_fops = {                                      \
        static ssize_t name##_##type##_write(struct file *file,         \
                        const char *buffer, size_t count, loff_t *off)  \
        {                                                               \
-               return lprocfs_##type##_seq_write(file, buffer, count, off);    \
+               return lprocfs_##type##_seq_write(file, buffer, count, off);\
        }                                                               \
-       static int name##_##type##_open(cfs_inode_t *inode, struct file *file)  \
+       static int name##_##type##_open(struct inode *inode, struct file *file)\
        {                                                               \
                return single_open(file, NULL, PDE_DATA(inode));        \
        }                                                               \
@@ -952,7 +952,7 @@ static inline void lprocfs_clear_stats(struct lprocfs_stats *stats)
 { return; }
 static inline void lprocfs_free_stats(struct lprocfs_stats **stats)
 { return; }
-static inline int lprocfs_register_stats(cfs_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; }
@@ -1003,24 +1003,24 @@ lprocfs_add_symlink(const char *name, struct proc_dir_entry *parent,
                     const char *format, ...)
 {return NULL; }
 #ifndef HAVE_ONLY_PROCFS_SEQ
-static inline cfs_proc_dir_entry_t *
-lprocfs_register(const char *name, cfs_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(cfs_proc_dir_entry_t *root,
+static inline int lprocfs_add_vars(struct proc_dir_entry *root,
                                    struct lprocfs_vars *var,
                                    void *data)
 { return 0; }
 #endif
-static inline int lprocfs_seq_add_vars(cfs_proc_dir_entry_t *root,
+static inline int lprocfs_seq_add_vars(struct proc_dir_entry *root,
                                       struct lprocfs_seq_vars *var,
                                       void *data)
 { return 0; }
-static inline cfs_proc_dir_entry_t *
-lprocfs_seq_register(const char *name, cfs_proc_dir_entry_t *parent,
+static inline struct proc_dir_entry *
+lprocfs_seq_register(const char *name, struct proc_dir_entry *parent,
                     struct lprocfs_seq_vars *list, void *data)
 { return NULL; }
-static inline void lprocfs_remove(cfs_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)
@@ -1029,7 +1029,7 @@ static inline void lprocfs_remove_proc_entry(const char *name,
 static inline void lprocfs_try_remove_proc_entry(const char *name,
                                                 struct proc_dir_entry *parent)
 { return; }
-static inline cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *head,
+static inline struct proc_dir_entry *lprocfs_srch(struct proc_dir_entry *head,
                                                  const char *name)
 { return 0; }
 #endif
index a84754b..83f52c3 100644 (file)
@@ -364,7 +364,7 @@ struct lu_client_seq {
         struct lu_seq_range         lcs_space;
 
         /* Seq related proc */
-        cfs_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;
@@ -411,7 +411,7 @@ struct lu_server_seq {
         struct dt_object       *lss_obj;
 
         /* Seq related proc */
-        cfs_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;
index 6f730b0..edd54f9 100644 (file)
@@ -72,7 +72,7 @@ struct lu_fld_target {
 struct lu_server_fld {
         /**
          * Fld dir proc entry. */
-        cfs_proc_dir_entry_t    *lsf_proc_dir;
+       struct proc_dir_entry   *lsf_proc_dir;
 
         /**
          * /fld file object device */
index 99218e2..1af3a6a 100644 (file)
@@ -2497,7 +2497,7 @@ struct ptlrpc_service {
        /** limit of threads number for each partition */
        int                             srv_nthrs_cpt_limit;
         /** Root of /proc dir tree for this service */
-        cfs_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 */
index aa87843..b7ecbdb 100644 (file)
@@ -168,7 +168,7 @@ struct qsd_instance;
  * enforcement. Arguments are documented where each function is defined.  */
 
 struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *,
-                             cfs_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 *);
index 21d32d0..0aa33c4 100644 (file)
@@ -153,7 +153,7 @@ struct lod_device {
        struct dt_device      lod_dt_dev;
        struct obd_export    *lod_child_exp;
        struct dt_device     *lod_child;
-       cfs_proc_dir_entry_t *lod_proc_entry;
+       struct proc_dir_entry *lod_proc_entry;
        struct lprocfs_stats *lod_stats;
        spinlock_t            lod_connects_lock;
        int                   lod_connects;
index 153d083..4c81409 100644 (file)
@@ -105,7 +105,7 @@ struct mdd_device {
        struct lu_fid                    mdd_local_root_fid;
         struct dt_device_param           mdd_dt_conf;
         struct dt_object                *mdd_orphans; /* PENDING directory */
-        cfs_proc_dir_entry_t            *mdd_proc_entry;
+       struct proc_dir_entry            *mdd_proc_entry;
         struct mdd_changelog             mdd_cl;
         unsigned long                    mdd_atime_diff;
         struct mdd_object               *mdd_dot_lustre;
index e763186..cb28d88 100644 (file)
@@ -138,7 +138,7 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
 {
        static struct ptlrpc_service_conf conf;
        struct obd_device *obd = m->mds_md_dev.md_lu_dev.ld_obd;
-       cfs_proc_dir_entry_t *procfs_entry;
+       struct proc_dir_entry *procfs_entry;
        int rc = 0;
        ENTRY;
 
index 6d10d5f..9948ae8 100644 (file)
@@ -167,10 +167,10 @@ struct mgs_device {
        struct dt_object                *mgs_nidtbl_dir;
        struct list_head                 mgs_fs_db_list;
        spinlock_t                       mgs_lock; /* covers mgs_fs_db_list */
-       cfs_proc_dir_entry_t            *mgs_proc_live;
-       cfs_proc_dir_entry_t            *mgs_proc_osd;
-       cfs_proc_dir_entry_t            *mgs_proc_fstype;
-       cfs_proc_dir_entry_t            *mgs_proc_mntdev;
+       struct proc_dir_entry           *mgs_proc_live;
+       struct proc_dir_entry           *mgs_proc_osd;
+       struct proc_dir_entry           *mgs_proc_fstype;
+       struct proc_dir_entry           *mgs_proc_mntdev;
        cfs_time_t                       mgs_start_time;
        struct obd_device               *mgs_obd;
        struct local_oid_storage        *mgs_los;
index c603bff..2171404 100644 (file)
@@ -191,8 +191,8 @@ int lprocfs_exp_print_hash_seq(cfs_hash_t *hs, cfs_hash_bd_t *bd,
        struct obd_export *exp = cfs_hash_object(hs, hnode);
 
        if (exp->exp_lock_hash != NULL) {
-               cfs_hash_debug_header_seq(m);
-               cfs_hash_debug_str_seq(hs, m);
+               cfs_hash_debug_header(m);
+               cfs_hash_debug_str(hs, m);
        }
        return 0;
 }
@@ -509,10 +509,10 @@ int lprocfs_hash_seq_show(struct seq_file *m, void *data)
        if (obd == NULL)
                return 0;
 
-       c += cfs_hash_debug_header_seq(m);
-       c += cfs_hash_debug_str_seq(obd->obd_uuid_hash, m);
-       c += cfs_hash_debug_str_seq(obd->obd_nid_hash, m);
-       c += cfs_hash_debug_str_seq(obd->obd_nid_stats_hash, m);
+       c += cfs_hash_debug_header(m);
+       c += cfs_hash_debug_str(obd->obd_uuid_hash, m);
+       c += cfs_hash_debug_str(obd->obd_nid_hash, m);
+       c += cfs_hash_debug_str(obd->obd_nid_stats_hash, m);
        return c;
 }
 EXPORT_SYMBOL(lprocfs_hash_seq_show);
index bcc442c..ac91062 100644 (file)
@@ -517,7 +517,7 @@ LPROC_SEQ_FOPS(lprocfs_nid_stats_clear);
 static int ofd_procfs_init(struct ofd_device *ofd)
 {
        struct obd_device               *obd = ofd_obd(ofd);
-       cfs_proc_dir_entry_t            *entry;
+       struct proc_dir_entry           *entry;
        int                              rc = 0;
 
        ENTRY;
index 16e7633..dd3822f 100644 (file)
@@ -244,7 +244,7 @@ struct osd_device {
        struct lustre_capa_key  *od_capa_keys;
        struct hlist_head       *od_capa_hash;
 
-       cfs_proc_dir_entry_t    *od_proc_entry;
+       struct proc_dir_entry   *od_proc_entry;
        struct lprocfs_stats    *od_stats;
 
        uint64_t                 od_root;
index ac58e8b..a0cf435 100644 (file)
@@ -119,7 +119,7 @@ struct osp_device {
        struct obd_uuid                  opd_cluuid;
        struct obd_connect_data         *opd_connect_data;
        int                              opd_connects;
-       cfs_proc_dir_entry_t            *opd_proc_entry;
+       struct proc_dir_entry           *opd_proc_entry;
        struct lprocfs_stats            *opd_stats;
        /* connection status. */
        unsigned int                     opd_new_connection:1,
@@ -188,7 +188,7 @@ struct osp_device {
        /* how often to update statfs data */
        int                              opd_statfs_maxage;
 
-       cfs_proc_dir_entry_t            *opd_symlink;
+       struct proc_dir_entry           *opd_symlink;
 
        /* If the caller wants to do some idempotent async operations on
         * remote server, it can append the async remote requests on the
index b4df058..ba7042c 100644 (file)
@@ -71,7 +71,7 @@ struct qmt_device {
        struct list_head         qmt_pool_list;
 
        /* procfs root directory for this qmt */
-       cfs_proc_dir_entry_t    *qmt_proc;
+       struct proc_dir_entry   *qmt_proc;
 
        /* dedicated thread in charge of space rebalancing */
        struct ptlrpc_thread     qmt_reba_thread;
@@ -130,7 +130,7 @@ struct qmt_pool_info {
        struct lquota_entry     *qpi_grace_lqe[MAXQUOTAS];
 
        /* procfs root directory for this pool */
-       cfs_proc_dir_entry_t    *qpi_proc;
+       struct proc_dir_entry   *qpi_proc;
 
        /* pool directory where all indexes related to this pool instance are
         * stored */
index fb6bccd..518c525 100644 (file)
@@ -53,7 +53,7 @@ struct qsd_instance {
 
        /* procfs directory where information related to the underlying slaves
         * are exported */
-       cfs_proc_dir_entry_t    *qsd_proc;
+       struct proc_dir_entry   *qsd_proc;
 
        /* export used for the connection to quota master */
        struct obd_export       *qsd_exp;
index 331a219..8be6f6a 100644 (file)
@@ -554,7 +554,7 @@ EXPORT_SYMBOL(qsd_fini);
  */
 struct qsd_instance *qsd_init(const struct lu_env *env, char *svname,
                              struct dt_device *dev,
-                             cfs_proc_dir_entry_t *osd_proc)
+                             struct proc_dir_entry *osd_proc)
 {
        struct qsd_thread_info  *qti = qsd_info(env);
        struct qsd_instance     *qsd;