btrfsprogs/0005-btrfs-progs-Directly-pass-root-to-change_devices_uui.patch
David Sterba bbad3810ab Accepting request 666631 from home:nikbor:branches:filesystems
- Implement fate#325871
    * Added 0001-btrfs-progs-Add-support-for-metadata_uuid-field.patch
    * Added 0002-btrfs-progs-btrfstune-Add-support-for-changing-the-u.patch
    * Added 0003-btrfs-progs-Remove-fsid-metdata_uuid-fields-from-fs_.patch
    * Added 0004-btrfs-progs-Remove-btrfs_fs_info-new_fsid.patch
    * Added 0005-btrfs-progs-Directly-pass-root-to-change_devices_uui.patch

OBS-URL: https://build.opensuse.org/request/show/666631
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=307
2019-01-17 14:35:40 +00:00

42 lines
1.4 KiB
Diff

From eb9657f801e4565acb8ba6b59f69e34316104c52 Mon Sep 17 00:00:00 2001
From: Nikolay Borisov <nborisov@suse.com>
Date: Thu, 11 Oct 2018 18:04:04 +0300
Subject: [PATCH 5/6] btrfs-progs: Directly pass root to change_devices_uuid
This function currently takes an fs_info only to reference the chunk
root. Just pass the root directly. No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
btrfstune.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/btrfstune.c b/btrfstune.c
index 74a7c37195b0..7466f7f4a198 100644
--- a/btrfstune.c
+++ b/btrfstune.c
@@ -309,9 +309,8 @@ static int change_device_uuid(struct extent_buffer *eb, int slot,
return ret;
}
-static int change_devices_uuid(struct btrfs_fs_info *fs_info, uuid_t new_fsid)
+static int change_devices_uuid(struct btrfs_root *root, uuid_t new_fsid)
{
- struct btrfs_root *root = fs_info->chunk_root;
struct btrfs_path path;
struct btrfs_key key = {0, 0, 0};
int ret = 0;
@@ -438,7 +437,7 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str)
/* Then devices */
printf("Change fsid on devices\n");
- ret = change_devices_uuid(fs_info, new_fsid);
+ ret = change_devices_uuid(fs_info->chunk_root, new_fsid);
if (ret < 0) {
error("failed to change UUID of devices: %d", ret);
goto out;
--
2.17.1