public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Zheng Yan <zheng.yan@oracle.com>
To: linux-btrfs@vger.kernel.org, Chris Mason <chris.mason@oracle.com>
Subject: [PATCH] properly set blocksize when adding new device.
Date: Tue, 02 Sep 2008 02:02:00 +0800	[thread overview]
Message-ID: <48BC2E18.9050506@oracle.com> (raw)

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

             reply	other threads:[~2008-09-01 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 18:02 Zheng Yan [this message]
2008-09-01 18:38 ` [PATCH] properly set blocksize when adding new device Zheng Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48BC2E18.9050506@oracle.com \
    --to=zheng.yan@oracle.com \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox