Whamcloud - gitweb
LU-8066 fld: move all files from procfs to debugfs 51/26651/14
authorJames Simmons <uja.ornl@yahoo.com>
Wed, 18 Apr 2018 02:45:34 +0000 (22:45 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 12 May 2018 03:52:36 +0000 (03:52 +0000)
Port of the upstream client work done by Dmitry Eremin.

Linux-commit: 827650494fbe9390052502d0498c8b90b2e329ec

Move all server side procfs handling to debugfs.

Change-Id: I6b0311d148576dec1ab1ef7ca1afce0ab2e4ed3b
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/26651
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/fld/fld_handler.c
lustre/fld/fld_internal.h
lustre/fld/fld_request.c
lustre/fld/lproc_fld.c
lustre/include/lustre_fld.h
lustre/lmv/lmv_obd.c

index 3750704..df64043 100644 (file)
@@ -389,53 +389,35 @@ int fid_is_local(const struct lu_env *env,
        return result;
 }
 
        return result;
 }
 
-static void fld_server_proc_fini(struct lu_server_fld *fld);
+static void fld_server_debugfs_fini(struct lu_server_fld *fld)
+{
+       if (!IS_ERR_OR_NULL(fld->lsf_debugfs_entry))
+               ldebugfs_remove(&fld->lsf_debugfs_entry);
+}
 
 
-#ifdef CONFIG_PROC_FS
-static int fld_server_proc_init(struct lu_server_fld *fld)
+static int fld_server_debugfs_init(struct lu_server_fld *fld)
 {
 {
-        int rc = 0;
-        ENTRY;
+       int rc = 0;
 
 
-       fld->lsf_proc_dir = lprocfs_register(fld->lsf_name, fld_type_proc_dir,
-                                            fld_server_proc_list, fld);
-       if (IS_ERR(fld->lsf_proc_dir)) {
-               rc = PTR_ERR(fld->lsf_proc_dir);
+       ENTRY;
+       fld->lsf_debugfs_entry = ldebugfs_register(fld->lsf_name,
+                                                  fld_debugfs_dir,
+                                                  NULL, NULL);
+       if (IS_ERR_OR_NULL(fld->lsf_debugfs_entry)) {
+               rc = fld->lsf_debugfs_entry ? PTR_ERR(fld->lsf_debugfs_entry)
+                                           : -ENOMEM;
+               fld->lsf_debugfs_entry = NULL;
                RETURN(rc);
        }
 
                RETURN(rc);
        }
 
-       rc = lprocfs_seq_create(fld->lsf_proc_dir, "fldb", 0444,
-                               &fld_proc_seq_fops, fld);
-       if (rc) {
-               lprocfs_remove(&fld->lsf_proc_dir);
-               fld->lsf_proc_dir = NULL;
-       }
+       rc = ldebugfs_seq_create(fld->lsf_debugfs_entry, "fldb", 0444,
+                                &fld_debugfs_seq_fops, fld);
+       if (rc)
+               ldebugfs_remove(&fld->lsf_debugfs_entry);
 
        RETURN(rc);
 }
 
 
        RETURN(rc);
 }
 
-static void fld_server_proc_fini(struct lu_server_fld *fld)
-{
-        ENTRY;
-        if (fld->lsf_proc_dir != NULL) {
-                if (!IS_ERR(fld->lsf_proc_dir))
-                        lprocfs_remove(&fld->lsf_proc_dir);
-                fld->lsf_proc_dir = NULL;
-        }
-        EXIT;
-}
-#else
-static int fld_server_proc_init(struct lu_server_fld *fld)
-{
-        return 0;
-}
-
-static void fld_server_proc_fini(struct lu_server_fld *fld)
-{
-        return;
-}
-#endif
-
 int fld_server_init(const struct lu_env *env, struct lu_server_fld *fld,
                    struct dt_device *dt, const char *prefix, int type)
 {
 int fld_server_init(const struct lu_env *env, struct lu_server_fld *fld,
                    struct dt_device *dt, const char *prefix, int type)
 {
@@ -463,7 +445,7 @@ int fld_server_init(const struct lu_env *env, struct lu_server_fld *fld,
        if (rc)
                GOTO(out_cache, rc);
 
        if (rc)
                GOTO(out_cache, rc);
 
-       rc = fld_server_proc_init(fld);
+       rc = fld_server_debugfs_init(fld);
        if (rc)
                GOTO(out_index, rc);
 
        if (rc)
                GOTO(out_index, rc);
 
@@ -484,7 +466,7 @@ void fld_server_fini(const struct lu_env *env, struct lu_server_fld *fld)
 {
        ENTRY;
 
 {
        ENTRY;
 
-       fld_server_proc_fini(fld);
+       fld_server_debugfs_fini(fld);
        fld_index_fini(env, fld);
 
        if (fld->lsf_cache != NULL) {
        fld_index_fini(env, fld);
 
        if (fld->lsf_cache != NULL) {
index 02a4702..5fce515 100644 (file)
@@ -138,12 +138,6 @@ enum {
 
 extern struct lu_fld_hash fld_hash[];
 
 
 extern struct lu_fld_hash fld_hash[];
 
-
-#ifdef CONFIG_PROC_FS
-extern struct proc_dir_entry *fld_type_proc_dir;
-extern struct lprocfs_vars fld_client_proc_list[];
-#endif
-
 # ifdef HAVE_SERVER_SUPPORT
 struct fld_thread_info {
        struct lu_seq_range fti_rec;
 # ifdef HAVE_SERVER_SUPPORT
 struct fld_thread_info {
        struct lu_seq_range fti_rec;
@@ -171,16 +165,15 @@ int fld_index_lookup(const struct lu_env *env, struct lu_server_fld *fld,
                     u64 seq, struct lu_seq_range *range);
 
 int fld_name_to_index(const char *name, __u32 *index);
                     u64 seq, struct lu_seq_range *range);
 
 int fld_name_to_index(const char *name, __u32 *index);
-int fld_server_mod_init(void);
 
 
+int fld_server_mod_init(void);
 void fld_server_mod_exit(void);
 
 int fld_server_read(const struct lu_env *env, struct lu_server_fld *fld,
                    struct lu_seq_range *range, void *data, int data_len);
 void fld_server_mod_exit(void);
 
 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 CONFIG_PROC_FS
-extern const struct file_operations fld_proc_seq_fops;
-extern struct lprocfs_vars fld_server_proc_list[];
-#endif
+
+extern const struct file_operations fld_debugfs_seq_fops;
+extern struct dentry *fld_debugfs_dir;
 
 # endif /* HAVE_SERVER_SUPPORT */
 
 
 # endif /* HAVE_SERVER_SUPPORT */
 
@@ -188,6 +181,8 @@ int fld_client_rpc(struct obd_export *exp,
                    struct lu_seq_range *range, __u32 fld_op,
                   struct ptlrpc_request **reqp);
 
                    struct lu_seq_range *range, __u32 fld_op,
                   struct ptlrpc_request **reqp);
 
+extern struct lprocfs_vars fld_client_debugfs_list[];
+
 struct fld_cache *fld_cache_init(const char *name,
                                  int cache_size, int cache_threshold);
 
 struct fld_cache *fld_cache_init(const char *name,
                                  int cache_size, int cache_threshold);
 
index 18b7186..d6f9b1c 100644 (file)
@@ -217,58 +217,34 @@ int fld_client_del_target(struct lu_client_fld *fld, __u64 idx)
        RETURN(-ENOENT);
 }
 
        RETURN(-ENOENT);
 }
 
-#ifdef CONFIG_PROC_FS
-static int fld_client_proc_init(struct lu_client_fld *fld)
+struct dentry *fld_debugfs_dir;
+
+static int fld_client_debugfs_init(struct lu_client_fld *fld)
 {
        int rc;
 {
        int rc;
-       ENTRY;
 
 
-       fld->lcf_proc_dir = lprocfs_register(fld->lcf_name, fld_type_proc_dir,
-                                            NULL, NULL);
-       if (IS_ERR(fld->lcf_proc_dir)) {
-               CERROR("%s: LProcFS failed in fld-init\n",
-                      fld->lcf_name);
-               rc = PTR_ERR(fld->lcf_proc_dir);
+       ENTRY;
+       fld->lcf_debugfs_entry = ldebugfs_register(fld->lcf_name,
+                                                  fld_debugfs_dir,
+                                                  fld_client_debugfs_list,
+                                                  fld);
+       if (IS_ERR_OR_NULL(fld->lcf_debugfs_entry)) {
+               CERROR("%s: LdebugFS failed in fld-init\n", fld->lcf_name);
+               rc = fld->lcf_debugfs_entry ? PTR_ERR(fld->lcf_debugfs_entry)
+                                           : -ENOMEM;
+               fld->lcf_debugfs_entry = NULL;
                RETURN(rc);
        }
 
                RETURN(rc);
        }
 
-       rc = lprocfs_add_vars(fld->lcf_proc_dir, fld_client_proc_list, fld);
-       if (rc) {
-               CERROR("%s: Can't init FLD proc, rc %d\n",
-                      fld->lcf_name, rc);
-               GOTO(out_cleanup, rc);
-       }
-
-       RETURN(0);
-
-out_cleanup:
-       fld_client_proc_fini(fld);
-       return rc;
-}
-
-void fld_client_proc_fini(struct lu_client_fld *fld)
-{
-        ENTRY;
-        if (fld->lcf_proc_dir) {
-                if (!IS_ERR(fld->lcf_proc_dir))
-                        lprocfs_remove(&fld->lcf_proc_dir);
-                fld->lcf_proc_dir = NULL;
-        }
-        EXIT;
-}
-#else /* !CONFIG_PROC_FS */
-static int fld_client_proc_init(struct lu_client_fld *fld)
-{
-        return 0;
+       return 0;
 }
 
 }
 
-void fld_client_proc_fini(struct lu_client_fld *fld)
+void fld_client_debugfs_fini(struct lu_client_fld *fld)
 {
 {
-        return;
+       if (!IS_ERR_OR_NULL(fld->lcf_debugfs_entry))
+               ldebugfs_remove(&fld->lcf_debugfs_entry);
 }
 }
-#endif /* CONFIG_PROC_FS */
-
-EXPORT_SYMBOL(fld_client_proc_fini);
+EXPORT_SYMBOL(fld_client_debugfs_fini);
 
 static inline int hash_is_sane(int hash)
 {
 
 static inline int hash_is_sane(int hash)
 {
@@ -278,14 +254,12 @@ static inline int hash_is_sane(int hash)
 int fld_client_init(struct lu_client_fld *fld,
                     const char *prefix, int hash)
 {
 int fld_client_init(struct lu_client_fld *fld,
                     const char *prefix, int hash)
 {
-        int cache_size, cache_threshold;
-        int rc;
-        ENTRY;
-
-        LASSERT(fld != NULL);
+       int cache_size, cache_threshold;
+       int rc;
 
 
-        snprintf(fld->lcf_name, sizeof(fld->lcf_name),
-                 "cli-%s", prefix);
+       ENTRY;
+       snprintf(fld->lcf_name, sizeof(fld->lcf_name),
+                "cli-%s", prefix);
 
         if (!hash_is_sane(hash)) {
                 CERROR("%s: Wrong hash function %#x\n",
 
         if (!hash_is_sane(hash)) {
                 CERROR("%s: Wrong hash function %#x\n",
@@ -312,7 +286,7 @@ int fld_client_init(struct lu_client_fld *fld,
                 GOTO(out, rc);
         }
 
                 GOTO(out, rc);
         }
 
-        rc = fld_client_proc_init(fld);
+       rc = fld_client_debugfs_init(fld);
         if (rc)
                 GOTO(out, rc);
         EXIT;
         if (rc)
                 GOTO(out, rc);
         EXIT;
@@ -531,22 +505,20 @@ void fld_client_flush(struct lu_client_fld *fld)
         fld_cache_flush(fld->lcf_cache);
 }
 
         fld_cache_flush(fld->lcf_cache);
 }
 
-
-struct proc_dir_entry *fld_type_proc_dir;
-
 static int __init fld_init(void)
 {
 static int __init fld_init(void)
 {
-       fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME,
-                                            proc_lustre_root,
-                                            NULL, NULL);
-       if (IS_ERR(fld_type_proc_dir))
-               return PTR_ERR(fld_type_proc_dir);
-
 #ifdef HAVE_SERVER_SUPPORT
 #ifdef HAVE_SERVER_SUPPORT
-       fld_server_mod_init();
+       int rc;
+
+       rc = fld_server_mod_init();
+       if (rc)
+               return rc;
 #endif /* HAVE_SERVER_SUPPORT */
 
 #endif /* HAVE_SERVER_SUPPORT */
 
-       return 0;
+       fld_debugfs_dir = ldebugfs_register(LUSTRE_FLD_NAME,
+                                           debugfs_lustre_root,
+                                           NULL, NULL);
+       return PTR_ERR_OR_ZERO(fld_debugfs_dir);
 }
 
 static void __exit fld_exit(void)
 }
 
 static void __exit fld_exit(void)
@@ -555,10 +527,8 @@ static void __exit fld_exit(void)
        fld_server_mod_exit();
 #endif /* HAVE_SERVER_SUPPORT */
 
        fld_server_mod_exit();
 #endif /* HAVE_SERVER_SUPPORT */
 
-       if (fld_type_proc_dir != NULL && !IS_ERR(fld_type_proc_dir)) {
-               lprocfs_remove(&fld_type_proc_dir);
-               fld_type_proc_dir = NULL;
-       }
+       if (!IS_ERR_OR_NULL(fld_debugfs_dir))
+               ldebugfs_remove(&fld_debugfs_dir);
 }
 
 MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
 }
 
 MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
index 3a985b3..1bcecdf 100644 (file)
 
 #include <libcfs/libcfs.h>
 #include <linux/module.h>
 
 #include <libcfs/libcfs.h>
 #include <linux/module.h>
+
+#ifdef HAVE_SERVER_SUPPORT
 #include <dt_object.h>
 #include <dt_object.h>
+#endif
 #include <obd_support.h>
 #include <lustre_fld.h>
 #include <lustre_fid.h>
 #include "fld_internal.h"
 
 #include <obd_support.h>
 #include <lustre_fld.h>
 #include <lustre_fid.h>
 #include "fld_internal.h"
 
-#ifdef CONFIG_PROC_FS
 static int
 static int
-fld_proc_targets_seq_show(struct seq_file *m, void *unused)
+fld_debugfs_targets_seq_show(struct seq_file *m, void *unused)
 {
        struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
         struct lu_fld_target *target;
 {
        struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
         struct lu_fld_target *target;
-       ENTRY;
-
-       LASSERT(fld != NULL);
 
 
+       ENTRY;
        spin_lock(&fld->lcf_lock);
        list_for_each_entry(target, &fld->lcf_targets, ft_chain)
        seq_printf(m, "%s\n", fld_target_name(target));
        spin_unlock(&fld->lcf_lock);
        spin_lock(&fld->lcf_lock);
        list_for_each_entry(target, &fld->lcf_targets, ft_chain)
        seq_printf(m, "%s\n", fld_target_name(target));
        spin_unlock(&fld->lcf_lock);
+
        RETURN(0);
 }
 
 static int
        RETURN(0);
 }
 
 static int
-fld_proc_hash_seq_show(struct seq_file *m, void *unused)
+fld_debugfs_hash_seq_show(struct seq_file *m, void *unused)
 {
        struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
 {
        struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
-       ENTRY;
-
-       LASSERT(fld != NULL);
 
 
+       ENTRY;
        spin_lock(&fld->lcf_lock);
        seq_printf(m, "%s\n", fld->lcf_hash->fh_name);
        spin_unlock(&fld->lcf_lock);
        spin_lock(&fld->lcf_lock);
        seq_printf(m, "%s\n", fld->lcf_hash->fh_name);
        spin_unlock(&fld->lcf_lock);
@@ -80,7 +79,7 @@ fld_proc_hash_seq_show(struct seq_file *m, void *unused)
 }
 
 static ssize_t
 }
 
 static ssize_t
-fld_proc_hash_seq_write(struct file *file, const char __user *buffer,
+fld_debugfs_hash_seq_write(struct file *file, const char __user *buffer,
                        size_t count, loff_t *off)
 {
        struct lu_client_fld *fld;
                        size_t count, loff_t *off)
 {
        struct lu_client_fld *fld;
@@ -95,9 +94,8 @@ fld_proc_hash_seq_write(struct file *file, const char __user *buffer,
                return -EFAULT;
 
        fld = ((struct seq_file *)file->private_data)->private;
                return -EFAULT;
 
        fld = ((struct seq_file *)file->private_data)->private;
-       LASSERT(fld != NULL);
 
 
-       for (i = 0; fld_hash[i].fh_name != NULL; i++) {
+       for (i = 0; fld_hash[i].fh_name; i++) {
                if (count != strlen(fld_hash[i].fh_name))
                        continue;
 
                if (count != strlen(fld_hash[i].fh_name))
                        continue;
 
@@ -107,7 +105,7 @@ fld_proc_hash_seq_write(struct file *file, const char __user *buffer,
                }
        }
 
                }
        }
 
-       if (hash != NULL) {
+       if (hash) {
                spin_lock(&fld->lcf_lock);
                fld->lcf_hash = hash;
                spin_unlock(&fld->lcf_lock);
                spin_lock(&fld->lcf_lock);
                fld->lcf_hash = hash;
                spin_unlock(&fld->lcf_lock);
@@ -119,15 +117,14 @@ fld_proc_hash_seq_write(struct file *file, const char __user *buffer,
        return count;
 }
 
        return count;
 }
 
-static ssize_t
-lprocfs_cache_flush_seq_write(struct file *file, const char __user *buffer,
-                              size_t count, loff_t *pos)
+static ssize_t ldebugfs_cache_flush_seq_write(struct file *file,
+                                             const char __user *buffer,
+                                             size_t count, loff_t *pos)
 {
 {
-       struct lu_client_fld *fld = ((struct seq_file *)file->private_data)->private;
-       ENTRY;
-
-        LASSERT(fld != NULL);
+       struct seq_file *m = file->private_data;
+       struct lu_client_fld *fld = m->private;
 
 
+       ENTRY;
         fld_cache_flush(fld->lcf_cache);
 
         CDEBUG(D_INFO, "%s: Lookup cache is flushed\n", fld->lcf_name);
         fld_cache_flush(fld->lcf_cache);
 
         CDEBUG(D_INFO, "%s: Lookup cache is flushed\n", fld->lcf_name);
@@ -135,15 +132,15 @@ lprocfs_cache_flush_seq_write(struct file *file, const char __user *buffer,
         RETURN(count);
 }
 
         RETURN(count);
 }
 
-LPROC_SEQ_FOPS_RO(fld_proc_targets);
-LPROC_SEQ_FOPS(fld_proc_hash);
-LPROC_SEQ_FOPS_WR_ONLY(fld, cache_flush);
+LDEBUGFS_SEQ_FOPS_RO(fld_debugfs_targets);
+LDEBUGFS_SEQ_FOPS(fld_debugfs_hash);
+LDEBUGFS_FOPS_WR_ONLY(fld, cache_flush);
 
 
-struct lprocfs_vars fld_client_proc_list[] = {
+struct lprocfs_vars fld_client_debugfs_list[] = {
        { .name =       "targets",
        { .name =       "targets",
-         .fops =       &fld_proc_targets_fops  },
+         .fops =       &fld_debugfs_targets_fops       },
        { .name =       "hash",
        { .name =       "hash",
-         .fops =       &fld_proc_hash_fops     },
+         .fops =       &fld_debugfs_hash_fops  },
        { .name =       "cache_flush",
          .fops =       &fld_cache_flush_fops   },
        { NULL }
        { .name =       "cache_flush",
          .fops =       &fld_cache_flush_fops   },
        { NULL }
@@ -275,17 +272,13 @@ struct seq_operations fldb_sops = {
 static int fldb_seq_open(struct inode *inode, struct file *file)
 {
        struct seq_file         *seq;
 static int fldb_seq_open(struct inode *inode, struct file *file)
 {
        struct seq_file         *seq;
-       struct lu_server_fld    *fld = (struct lu_server_fld *)PDE_DATA(inode);
+       struct lu_server_fld    *fld = inode->i_private;
        struct dt_object        *obj;
        const struct dt_it_ops  *iops;
        struct fld_seq_param    *param = NULL;
        int                     env_init = 0;
        int                     rc;
 
        struct dt_object        *obj;
        const struct dt_it_ops  *iops;
        struct fld_seq_param    *param = NULL;
        int                     env_init = 0;
        int                     rc;
 
-       rc = LPROCFS_ENTRY_CHECK(inode);
-       if (rc < 0)
-               return rc;
-
        rc = seq_open(file, &fldb_sops);
        if (rc)
                GOTO(out, rc);
        rc = seq_open(file, &fldb_sops);
        if (rc)
                GOTO(out, rc);
@@ -355,17 +348,11 @@ static int fldb_seq_release(struct inode *inode, struct file *file)
        return 0;
 }
 
        return 0;
 }
 
-const struct file_operations fld_proc_seq_fops = {
+const struct file_operations fld_debugfs_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = fldb_seq_open,
        .read    = seq_read,
        .release = fldb_seq_release,
 };
 
        .owner   = THIS_MODULE,
        .open    = fldb_seq_open,
        .read    = seq_read,
        .release = fldb_seq_release,
 };
 
-struct lprocfs_vars fld_server_proc_list[] = {
-       { NULL }
-};
-
 # endif /* HAVE_SERVER_SUPPORT */
 # endif /* HAVE_SERVER_SUPPORT */
-
-#endif /* CONFIG_PROC_FS */
index 4d77253..102dcfa 100644 (file)
@@ -67,9 +67,10 @@ struct lu_fld_target {
 };
 
 struct lu_server_fld {
 };
 
 struct lu_server_fld {
-        /**
-         * Fld dir proc entry. */
-       struct proc_dir_entry   *lsf_proc_dir;
+       /**
+        * Fld dir debugfs entry.
+        */
+       struct dentry           *lsf_debugfs_entry;
 
         /**
          * /fld file object device */
 
         /**
          * /fld file object device */
@@ -108,8 +109,9 @@ struct lu_server_fld {
 
 struct lu_client_fld {
        /**
 
 struct lu_client_fld {
        /**
-        * Client side proc entry. */
-       struct proc_dir_entry   *lcf_proc_dir;
+        * Client side debugfs entry.
+        */
+       struct dentry           *lcf_debugfs_entry;
 
        /**
         * List of exports client FLD knows about. */
 
        /**
         * List of exports client FLD knows about. */
@@ -132,7 +134,8 @@ struct lu_client_fld {
         struct fld_cache        *lcf_cache;
 
         /**
         struct fld_cache        *lcf_cache;
 
         /**
-         * Client fld proc entry name. */
+        * Client fld debugfs entry name.
+        */
         char                     lcf_name[80];
 };
 
         char                     lcf_name[80];
 };
 
@@ -189,7 +192,7 @@ int fld_client_add_target(struct lu_client_fld *fld,
 int fld_client_del_target(struct lu_client_fld *fld,
                           __u64 idx);
 
 int fld_client_del_target(struct lu_client_fld *fld,
                           __u64 idx);
 
-void fld_client_proc_fini(struct lu_client_fld *fld);
+void fld_client_debugfs_fini(struct lu_client_fld *fld);
 
 /** @} fld */
 
 
 /** @} fld */
 
index 5231b97..19742bb 100644 (file)
@@ -2595,7 +2595,7 @@ static int lmv_precleanup(struct obd_device *obd)
 {
        ENTRY;
        libcfs_kkuc_group_rem(&obd->obd_uuid, 0, KUC_GRP_HSM);
 {
        ENTRY;
        libcfs_kkuc_group_rem(&obd->obd_uuid, 0, KUC_GRP_HSM);
-       fld_client_proc_fini(&obd->u.lmv.lmv_fld);
+       fld_client_debugfs_fini(&obd->u.lmv.lmv_fld);
        lprocfs_obd_cleanup(obd);
        lprocfs_free_md_stats(obd);
        RETURN(0);
        lprocfs_obd_cleanup(obd);
        lprocfs_free_md_stats(obd);
        RETURN(0);