Skip to content

Commit

Permalink
Btrfs: properly set blocksize when adding new device.
Browse files Browse the repository at this point in the history
---

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Zheng Yan authored and Chris Mason committed Sep 25, 2008
1 parent 6527cdb commit 325cd4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 325cd4b

Please sign in to comment.