public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@gmail.com>
To: Karel Zak <kzak@redhat.com>
Cc: Goffredo Baroncelli <kreijack@inwind.it>,
	util-linux@vger.kernel.org,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	Chris Mason <chris.mason@fusionio.com>,
	Chris Murphy <lists@colorremedies.com>
Subject: Re: Btrfs: wipe all the superblock [redhat bugzilla 889888]
Date: Wed, 09 Jan 2013 18:48:28 +0100	[thread overview]
Message-ID: <50EDAD6C.4050901@gmail.com> (raw)
In-Reply-To: <20130108164314.GA9177@x2.net.home>

Hi Karel,

> 
>  You can specify more than one magic strings for the same filesystem,
>  the .magics = { } is array.

thanks for you suggestion. However this seems to me not applicable. I
tried to change the code, and what I got to me seems inconsistently:

Whit this change

1) if I do "wipefs <device>", I got the offset of the first superblock
(good enough)
2) if I do "wipefs -a <device>", I clean-up *all three* superblocks
(very good)
3) if I do "wipefs -o <offset> <device>", I clean-up only the superblock
located at <offset> (very bad)

If the user doesn't know enough btrfs, trying 1) and 3) could think that
the disk is cleaned-up. Instead the 2nd and the 3rd super-blocks still
exist.

>  see for example libblkid/src/superblocks/reiserfs.c 

I think that this is a different case: the reiser superblocks are
*alternative*; instead in the btrfs case, *all the three superblocks*
exist at the same time.

>  Karel
Ciao
Goffredo

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

  reply	other threads:[~2013-01-09 17:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 18:28 Btrfs: wipe all the superblock [redhat bugzilla 889888] Goffredo Baroncelli
2013-01-07 16:33 ` David Sterba
2013-01-07 18:20   ` Goffredo Baroncelli
2013-01-07 18:24     ` Hugo Mills
2013-01-07 18:33       ` Goffredo Baroncelli
2013-01-08 17:14     ` David Sterba
2013-01-08 15:48 ` Günter Gersdorf
2013-01-08 20:31   ` Goffredo Baroncelli
2013-01-09  8:09     ` Günter Gersdorf
2013-01-08 16:43 ` Karel Zak
2013-01-09 17:48   ` Goffredo Baroncelli [this message]
2013-01-09 18:10     ` Karel Zak
2013-01-08 18:01 ` Karel Zak
2013-01-08 20:09   ` Goffredo Baroncelli
2013-01-08 20:27     ` Chris Murphy

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=50EDAD6C.4050901@gmail.com \
    --to=kreijack@gmail.com \
    --cc=chris.mason@fusionio.com \
    --cc=kreijack@inwind.it \
    --cc=kzak@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=util-linux@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