From: Anand Jain <Anand.Jain@oracle.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: a copy of superblock is zero may not mean btrfs is not there
Date: Wed, 17 Apr 2013 10:19:09 +0800 [thread overview]
Message-ID: <516E069D.4070103@oracle.com> (raw)
In-Reply-To: <20130416115756.GJ18193@twin.jikos.cz>
On 04/16/2013 07:57 PM, David Sterba wrote:
> On Fri, Apr 12, 2013 at 03:55:06PM +0800, Anand Jain wrote:
>> If one of the copy of the superblock is zero it does not
>> confirm to us that btrfs isn't there on that disk. When
>> we are having more than one copy of superblock we should
>> rather let the for loop to continue to check other copies.
>>
>> the following test case and results would justify the
>> fix
>>
>> mkfs.btrfs /dev/sdb /dev/sdc -f
>> mount /dev/sdb /btrfs
>> dd if=/dev/zero bs=1 count=8 of=/dev/sdc seek=$((64*1024+64))
>> ~/before/btrfs-select-super -s 1 /dev/sdc
>> using SB copy 1, bytenr 67108864
>>
>> here btrfs-select-super just wrote superblock to a mounted btrfs
>
> Why does not check_mounted() catch this in the first place? Ie. based on
> the status in /proc/mounts not on random bytes in the superblock.
the reason is, as of now /proc/mounts just knows about the devid 1.
Thanks, Anand
next prev parent reply other threads:[~2013-04-17 2:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 7:55 [PATCH] btrfs-progs: a copy of superblock is zero may not mean btrfs is not there Anand Jain
2013-04-16 11:57 ` David Sterba
2013-04-17 2:19 ` Anand Jain [this message]
2013-04-17 17:12 ` David Sterba
2013-04-18 8:36 ` Anand Jain
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=516E069D.4070103@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--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