@@ -292,6 +292,7 @@ typedef struct xfs_mount {
struct delayed_work m_reclaim_work; /* background inode reclaim */
struct xfs_zone_info *m_zone_info; /* zone allocator information */
struct dentry *m_debugfs; /* debugfs parent */
+ struct dentry *m_debugfs_uuid; /* debugfs symlink */
struct xfs_kobj m_kobj;
struct xfs_kobj m_error_kobj;
struct xfs_kobj m_error_meta_kobj;
@@ -780,6 +780,7 @@ xfs_mount_free(
if (mp->m_ddev_targp)
xfs_free_buftarg(mp->m_ddev_targp);
+ debugfs_remove(mp->m_debugfs_uuid);
debugfs_remove(mp->m_debugfs);
kfree(mp->m_rtname);
kfree(mp->m_logname);
@@ -1893,6 +1894,16 @@ xfs_fs_fill_super(
goto out_unmount;
}
+ if (xfs_debugfs && mp->m_debugfs && !xfs_has_nouuid(mp)) {
+ char name[UUID_STRING_LEN + 1];
+
+ snprintf(name, UUID_STRING_LEN + 1, "%pU", &mp->m_sb.sb_uuid);
+ mp->m_debugfs_uuid = debugfs_create_symlink(name, xfs_debugfs,
+ mp->m_super->s_id);
+ } else {
+ mp->m_debugfs_uuid = NULL;
+ }
+
return 0;
out_filestream_unmount: