Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 325cd4ba authored by Zheng Yan's avatar Zheng Yan Committed by Chris Mason
Browse files

Btrfs: properly set blocksize when adding new device.



---

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 6527cdbe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);