Hello, blocksize != 4096 causes btrfs super block written to wrong location. --- diff -r 8fe9e10847fa volumes.c --- a/volumes.c Thu Aug 28 06:21:17 2008 -0400 +++ b/volumes.c Tue Sep 02 01:41:40 2008 +0800 @@ -1078,6 +1078,8 @@ 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); -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Zheng Yan
2008-Sep-01 18:38 UTC
Re: [PATCH] properly set blocksize when adding new device.
Sorry, previous patch is malformed, please use this one. --- diff -r 8fe9e10847fa volumes.c --- a/volumes.c Thu Aug 28 06:21:17 2008 -0400 +++ b/volumes.c Tue Sep 02 02:33:12 2008 +0800 @@ -1078,6 +1078,8 @@ 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); -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html