From 49ac5f50b5d466c92be25c83aa354c64c1f00ca3 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Sat, 6 Jun 2015 01:39:26 +0200 Subject: [PATCH] btrfs-progs: mkfs: move info message out of btrfs_add_to_fsid Signed-off-by: David Sterba --- mkfs.c | 9 +++++++++ utils.c | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mkfs.c b/mkfs.c index c0f60609..08257657 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1522,6 +1522,15 @@ int main(int ac, char **av) ret = btrfs_add_to_fsid(trans, root, fd, file, dev_block_count, sectorsize, sectorsize, sectorsize); BUG_ON(ret); + if (verbose >= 2) { + struct btrfs_device *device; + + device = container_of(root->fs_info->fs_devices->devices.next, + struct btrfs_device, dev_list); + printf("adding device %s id %llu\n", file, + (unsigned long long)device->devid); + } + btrfs_register_one_device(file); } diff --git a/utils.c b/utils.c index 4554f0d1..61a9cd93 100644 --- a/utils.c +++ b/utils.c @@ -762,9 +762,6 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, memcpy(disk_super, super, sizeof(*disk_super)); - printf("adding device %s id %llu\n", path, - (unsigned long long)device->devid); - btrfs_set_super_bytenr(disk_super, BTRFS_SUPER_INFO_OFFSET); btrfs_set_stack_device_id(dev_item, device->devid); btrfs_set_stack_device_type(dev_item, device->type);