From: Zheng Yan Date: Fri, 5 Sep 2008 20:43:54 +0000 (-0400) Subject: Btrfs: properly set blocksize when adding new device. X-Git-Tag: firefly_0821_release~15789^2~11^2~55^2~56^2~30^2~17 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=325cd4bafeb6cfb44addd6e807a9b74170d1be31;p=firefly-linux-kernel-4.4.55.git Btrfs: properly set blocksize when adding new device. --- Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 37a8ea23e81d..1546fa6f4f7d 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1079,6 +1079,8 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) if (ret) goto out_close_bdev; + set_blocksize(device->bdev, 4096); + total_bytes = btrfs_super_total_bytes(&root->fs_info->super_copy); btrfs_set_super_total_bytes(&root->fs_info->super_copy, total_bytes + device->total_bytes);