btrfs-progs: mkfs: move info message out of btrfs_add_to_fsid

Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2015-06-06 01:39:26 +02:00
parent 42a8983143
commit 49ac5f50b5
2 changed files with 9 additions and 3 deletions

9
mkfs.c
View File

@ -1522,6 +1522,15 @@ int main(int ac, char **av)
ret = btrfs_add_to_fsid(trans, root, fd, file, dev_block_count, ret = btrfs_add_to_fsid(trans, root, fd, file, dev_block_count,
sectorsize, sectorsize, sectorsize); sectorsize, sectorsize, sectorsize);
BUG_ON(ret); 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); btrfs_register_one_device(file);
} }

View File

@ -762,9 +762,6 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
memcpy(disk_super, super, sizeof(*disk_super)); 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_super_bytenr(disk_super, BTRFS_SUPER_INFO_OFFSET);
btrfs_set_stack_device_id(dev_item, device->devid); btrfs_set_stack_device_id(dev_item, device->devid);
btrfs_set_stack_device_type(dev_item, device->type); btrfs_set_stack_device_type(dev_item, device->type);