diff options
author | Jacob Malevich <jam@daterainc.com> | 2015-02-02 17:29:15 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-18 20:26:54 -0900 |
commit | 29fa4033ce7aef6d5ab087415abff5fa333a99ba (patch) | |
tree | 2c17b763159672afecbf74cb9bf7b17c56f2cf90 | |
parent | 05565e8d30be32d44083483c7f1cb2852856ea74 (diff) |
bcache: Add sysfs internal uuid attribute
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Issue DAT-1913
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | drivers/md/bcache/sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index 3792b9e8476e..19ff4f87ff53 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -92,6 +92,7 @@ read_attribute(btree_written); read_attribute(metadata_written); read_attribute(journal_debug); write_attribute(journal_flush); +read_attribute(internal_uuid); sysfs_time_stats_attribute(mca_alloc, sec, us); sysfs_time_stats_attribute(mca_scan, sec, ms); @@ -639,6 +640,8 @@ SHOW(bch_cache_set) sysfs_print(tree_depth, c->btree_roots[BTREE_ID_EXTENTS]->level); sysfs_print(root_usage_percent, bch_root_usage(c)); + sysfs_printf(internal_uuid, "%pU", c->sb.set_uuid.b); + return 0; } @@ -964,6 +967,7 @@ static struct attribute *bch_cache_set_internal_files[] = { &sysfs_tiering_enabled, sysfs_pd_controller_files(tiering), sysfs_pd_controller_files(foreground_write), + &sysfs_internal_uuid, NULL }; |