@@ -303,8 +303,8 @@ static ssize_t max_mod_rpcs_in_flight_store(struct kobject *kobj,
LUSTRE_RW_ATTR(max_pages_per_rpc);
-#define mdc_conn_uuid_show conn_uuid_show
-LUSTRE_RO_ATTR(mdc_conn_uuid);
+LUSTRE_ATTR(mds_conn_uuid, 0444, conn_uuid_show, NULL);
+LUSTRE_RO_ATTR(conn_uuid);
LUSTRE_RO_ATTR(ping);
@@ -529,7 +529,8 @@ static ssize_t mdc_dom_min_repsize_seq_write(struct file *file,
&lustre_attr_max_rpcs_in_flight.attr,
&lustre_attr_max_mod_rpcs_in_flight.attr,
&lustre_attr_max_pages_per_rpc.attr,
- &lustre_attr_mdc_conn_uuid.attr,
+ &lustre_attr_mds_conn_uuid.attr,
+ &lustre_attr_conn_uuid.attr,
&lustre_attr_ping.attr,
NULL,
};
@@ -66,13 +66,14 @@ struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
{ NULL }
};
-#define mgs_conn_uuid_show conn_uuid_show
-LUSTRE_RO_ATTR(mgs_conn_uuid);
+LUSTRE_ATTR(mgs_conn_uuid, 0444, conn_uuid_show, NULL);
+LUSTRE_RO_ATTR(conn_uuid);
LUSTRE_RO_ATTR(ping);
static struct attribute *mgc_attrs[] = {
&lustre_attr_mgs_conn_uuid.attr,
+ &lustre_attr_conn_uuid.attr,
&lustre_attr_ping.attr,
NULL,
};
@@ -524,30 +524,6 @@ int lprocfs_rd_server_uuid(struct seq_file *m, void *data)
}
EXPORT_SYMBOL(lprocfs_rd_server_uuid);
-int lprocfs_rd_conn_uuid(struct seq_file *m, void *data)
-{
- struct obd_device *obd = data;
- struct ptlrpc_connection *conn;
- int rc;
-
- LASSERT(obd);
-
- rc = lprocfs_climp_check(obd);
- if (rc)
- return rc;
-
- conn = obd->u.cli.cl_import->imp_connection;
- if (conn && obd->u.cli.cl_import)
- seq_printf(m, "%s\n", conn->c_remote_uuid.uuid);
- else
- seq_puts(m, "<none>\n");
-
- up_read(&obd->u.cli.cl_sem);
-
- return 0;
-}
-EXPORT_SYMBOL(lprocfs_rd_conn_uuid);
-
/**
* Lock statistics structure for access, possibly only on this CPU.
*
@@ -173,8 +173,8 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj,
}
LUSTRE_RW_ATTR(max_dirty_mb);
-#define ost_conn_uuid_show conn_uuid_show
-LUSTRE_RO_ATTR(ost_conn_uuid);
+LUSTRE_ATTR(ost_conn_uuid, 0444, conn_uuid_show, NULL);
+LUSTRE_RO_ATTR(conn_uuid);
LUSTRE_RO_ATTR(ping);
@@ -962,6 +962,7 @@ void lproc_osc_attach_seqstat(struct obd_device *dev)
&lustre_attr_short_io_bytes.attr,
&lustre_attr_resend_count.attr,
&lustre_attr_ost_conn_uuid.attr,
+ &lustre_attr_conn_uuid.attr,
&lustre_attr_ping.attr,
&lustre_attr_idle_timeout.attr,
&lustre_attr_idle_connect.attr,