Btrfs: properly set blocksize when adding new device.
authorZheng Yan <zheng.yan@oracle.com>
Fri, 5 Sep 2008 20:43:54 +0000 (16:43 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:07 +0000 (11:04 -0400)
---

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/volumes.c

index 37a8ea23e81de085ed67b40ac0bc47e3e925f669..1546fa6f4f7d025c6d363320debdc2771131f704 100644 (file)
@@ -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);