aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorZheng Yan <zheng.yan@oracle.com>2008-09-05 16:43:54 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:07 -0400
commit325cd4bafeb6cfb44addd6e807a9b74170d1be31 (patch)
tree5c3c600bdf545a7d2152981a49fb46b1e8ddc5a0 /fs/btrfs/volumes.c
parent6527cdbe68a27a2ee745f36d001aa32d0f46f370 (diff)
Btrfs: properly set blocksize when adding new device.
--- Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 2 insertions, 0 deletions
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)
1079 if (ret) 1079 if (ret)
1080 goto out_close_bdev; 1080 goto out_close_bdev;
1081 1081
1082 set_blocksize(device->bdev, 4096);
1083
1082 total_bytes = btrfs_super_total_bytes(&root->fs_info->super_copy); 1084 total_bytes = btrfs_super_total_bytes(&root->fs_info->super_copy);
1083 btrfs_set_super_total_bytes(&root->fs_info->super_copy, 1085 btrfs_set_super_total_bytes(&root->fs_info->super_copy,
1084 total_bytes + device->total_bytes); 1086 total_bytes + device->total_bytes);