public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] properly set blocksize when adding new device.
@ 2008-09-01 18:02 Zheng Yan
  2008-09-01 18:38 ` Zheng Yan
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yan @ 2008-09-01 18:02 UTC (permalink / raw)
  To: linux-btrfs, Chris Mason

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-01 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01 18:02 [PATCH] properly set blocksize when adding new device Zheng Yan
2008-09-01 18:38 ` Zheng Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox