mirror of
https://github.com/kdave/btrfs-progs
synced 2025-05-08 19:07:56 +00:00
btrfs-progs: btrfstune: Refactor change_devices_uuid to use btrfs_fs_info
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f85fc6e378
commit
de8622fcd0
@ -177,10 +177,9 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int change_device_uuid(struct btrfs_root *root, struct extent_buffer *eb,
|
static int change_device_uuid(struct btrfs_fs_info *fs_info, struct extent_buffer *eb,
|
||||||
int slot)
|
int slot)
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *fs_info = root->fs_info;
|
|
||||||
struct btrfs_dev_item *di;
|
struct btrfs_dev_item *di;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -216,7 +215,7 @@ static int change_devices_uuid(struct btrfs_fs_info *fs_info)
|
|||||||
if (key.type != BTRFS_DEV_ITEM_KEY ||
|
if (key.type != BTRFS_DEV_ITEM_KEY ||
|
||||||
key.objectid != BTRFS_DEV_ITEMS_OBJECTID)
|
key.objectid != BTRFS_DEV_ITEMS_OBJECTID)
|
||||||
goto next;
|
goto next;
|
||||||
ret = change_device_uuid(root, path.nodes[0], path.slots[0]);
|
ret = change_device_uuid(fs_info, path.nodes[0], path.slots[0]);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
next:
|
next:
|
||||||
|
Loading…
Reference in New Issue
Block a user