diff options
author | David Sterba <dsterba@suse.cz> | 2015-06-03 15:24:56 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-06-03 15:55:15 +0200 |
commit | e106c695bfb811d0074ddff2a90aee753eee11b2 (patch) | |
tree | b6da7eb78336940f90a0e8ded5d85f32c6b30440 | |
parent | 551c4bb064808d500e089e395886c73384576a6d (diff) |
btrfs-progs: btrfstune: make uuid rewrite progress more verbose
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | btrfstune.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/btrfstune.c b/btrfstune.c index dd5626ef..7b178b19 100644 --- a/btrfstune.c +++ b/btrfstune.c @@ -321,6 +321,7 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str) { uuid_t new_fsid; uuid_t new_chunk_id; + uuid_t old_fsid; char uuid_buf[BTRFS_UUID_UNPARSED_SIZE]; int ret = 0; @@ -347,14 +348,20 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str) fs_info->new_fsid = new_fsid; fs_info->new_chunk_tree_uuid = new_chunk_id; + uuid_parse((const char*)fs_info->fsid, old_fsid); + uuid_unparse_upper(old_fsid, uuid_buf); + printf("Current fsid: %s\n", uuid_buf); + uuid_unparse_upper(new_fsid, uuid_buf); - printf("Changing fsid to %s\n", uuid_buf); + printf("New fsid: %s\n", uuid_buf); /* Now we can begin fsid change */ + printf("Set superblock flag CHANGING_FSID\n"); ret = change_fsid_prepare(fs_info); if (ret < 0) goto out; /* Change extents first */ + printf("Change fsid in extents\n"); ret = change_extents_uuid(fs_info); if (ret < 0) { fprintf(stderr, "Failed to change UUID of metadata\n"); @@ -362,6 +369,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); if (ret < 0) { fprintf(stderr, "Failed to change UUID of devices\n"); @@ -378,10 +386,11 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str) goto out; /* Now fsid change is done */ + printf("Clear superblock flag CHANGING_FSID\n"); ret = change_fsid_done(fs_info); fs_info->new_fsid = NULL; fs_info->new_chunk_tree_uuid = NULL; - printf("Fsid changed to %s\n", uuid_buf); + printf("Fsid change finished\n"); out: return ret; } |