diff mbox series

[RFC,1/2] btrfs-progs: print device list volumes-c api

Message ID 45dde58845e0e034ba0fed5ab84c4aae8b7a84f0.1688367941.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: boilerplate code for printing devices. | expand

Commit Message

Anand Jain July 3, 2023, 7:55 a.m. UTC
We need fs_uuid to print the device list. Export it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 kernel-shared/volumes.c | 5 +++++
 kernel-shared/volumes.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel-shared/volumes.c b/kernel-shared/volumes.c
index 92282524867d..c6c71fd29215 100644
--- a/kernel-shared/volumes.c
+++ b/kernel-shared/volumes.c
@@ -2939,3 +2939,8 @@  int btrfs_fix_device_and_super_size(struct btrfs_fs_info *fs_info)
 	}
 	return ret;
 }
+
+struct list_head * btrfs_get_fs_uuids(void)
+{
+	return &fs_uuids;
+}
diff --git a/kernel-shared/volumes.h b/kernel-shared/volumes.h
index ab5ac40269bb..2022ce37cf09 100644
--- a/kernel-shared/volumes.h
+++ b/kernel-shared/volumes.h
@@ -312,5 +312,5 @@  int btrfs_bg_type_to_nparity(u64 flags);
 int btrfs_bg_type_to_sub_stripes(u64 flags);
 u64 btrfs_bg_flags_for_device_num(int number);
 bool btrfs_bg_type_is_stripey(u64 flags);
-
+struct list_head * btrfs_get_fs_uuids(void);
 #endif