Whamcloud - gitweb
LU-8066 obdecho: remove last user of lprocfs_uuid_seq_show 00/57400/3
authorJames Simmons <jsimmons@infradead.org>
Thu, 12 Dec 2024 16:20:46 +0000 (09:20 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Jan 2025 22:05:11 +0000 (22:05 +0000)
The function lprocfs_obd_setup() will by default create a set
of sysfs files. One of those files is uuid. With this being
the case obdecho is creating two uuid files, one in sysfs and
the other in debugfs. We don't need the debugfs version so
remove it. With this change we can remove the last uuid
debugfs / procfs version. Also procfs setup for obdecho is
no longer needed.

Change-Id: I741b8f98ebac83da95255cb6c26b70f9fbce3ef7
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57400
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lprocfs_status.h
lustre/obdclass/lprocfs_status.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c

index ff905d0..7303242 100644 (file)
@@ -591,7 +591,6 @@ extern void lprocfs_stats_header(struct seq_file *seq, ktime_t now,
 extern unsigned int obd_enable_stats_header;
 
 /* Generic callbacks */
-extern int lprocfs_uuid_seq_show(struct seq_file *m, void *data);
 extern int lprocfs_server_uuid_seq_show(struct seq_file *m, void *data);
 ssize_t conn_uuid_show(struct kobject *kobj, struct attribute *attr, char *buf);
 extern int lprocfs_import_seq_show(struct seq_file *m, void *data);
@@ -1098,11 +1097,6 @@ static inline int lprocfs_obd_cleanup(struct obd_device *obd)
        return 0;
 }
 
-static inline int lprocfs_uuid_seq_show(struct seq_file *m, void *data)
-{
-       return 0;
-}
-
 static inline int lprocfs_server_seq_show(struct seq_file *m, void *data)
 {
        return 0;
index 97dab8a..c287606 100644 (file)
@@ -207,16 +207,6 @@ lprocfs_register(const char *name, struct proc_dir_entry *parent,
 EXPORT_SYMBOL(lprocfs_register);
 
 /* Generic callbacks */
-int lprocfs_uuid_seq_show(struct seq_file *m, void *data)
-{
-       struct obd_device *obd = data;
-
-       LASSERT(obd != NULL);
-       seq_printf(m, "%s\n", obd->obd_uuid.uuid);
-       return 0;
-}
-EXPORT_SYMBOL(lprocfs_uuid_seq_show);
-
 static ssize_t uuid_show(struct kobject *kobj, struct attribute *attr,
                         char *buf)
 {
index 88b802a..dd76a9d 100644 (file)
@@ -460,13 +460,6 @@ commitrw_cleanup:
        return rc;
 }
 
-LPROC_SEQ_FOPS_RO_TYPE(echo, uuid);
-static struct lprocfs_vars lprocfs_echo_obd_vars[] = {
-       { .name =       "uuid",
-         .fops =       &echo_uuid_fops         },
-       { NULL }
-};
-
 const struct obd_ops echo_obd_ops = {
        .o_owner           = THIS_MODULE,
        .o_connect         = echo_connect,
@@ -776,7 +769,6 @@ static int echo_srv_init0(const struct lu_env *env,
                RETURN(rc);
        }
 
-       obd->obd_vars = lprocfs_echo_obd_vars;
        if (!lprocfs_obd_setup(obd, true) &&
            ldebugfs_alloc_obd_stats(obd, LPROC_ECHO_LAST) == 0) {
                lprocfs_counter_init(obd->obd_stats, LPROC_ECHO_READ_BYTES,
index bf7b3f1..3f664ae 100644 (file)
@@ -2599,7 +2599,7 @@ static int __init obdecho_init(void)
        if (rc != 0)
                goto failed_0;
 
-       rc = class_register_type(&echo_obd_ops, NULL, true,
+       rc = class_register_type(&echo_obd_ops, NULL, false,
                                 LUSTRE_ECHO_NAME, &echo_srv_type);
        if (rc != 0)
                goto failed_1;