linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>, guihc.fnst@cn.fujitsu.com
Subject: Re: [PATCH] btrfs-show-super: don't try to print not-superblocks
Date: Wed, 28 May 2014 18:07:30 +0200	[thread overview]
Message-ID: <20140528160730.GO5346@twin.jikos.cz> (raw)
In-Reply-To: <5372CED8.7030404@redhat.com>

On Tue, May 13, 2014 at 09:03:04PM -0500, Eric Sandeen wrote:
> If we point btrfs-show-super at a not-btrfs-device and
> try to print all superblocks, bad things are apt to happen:
> 
> superblock: bytenr=274877906944, device=/dev/sdc2
> ---------------------------------------------------------
> btrfs-show-super: ctree.h:1984: btrfs_super_csum_size: Assertion `!(t >= (sizeof(btrfs_csum_sizes) / sizeof((btrfs_csum_sizes)[0])))' failed.
> csum			0xAborted
> 
> Don't try to print superblocks that don't look like superblocks,
> and add an "-f" (force) option to try anyway, if the user
> really wants to give it a shot.

The option -f clashes with "add sys_chunk_array and backup roots info to
show-super" from Gui Hecheng. I've merged the changes and renamed yours
to -F.

> Fix some spelling & capitalization while we're at it.

The manpage fixes do not apply to the asciidoc (already there).

> The manpage says that if any problem happens, 1 will
> be returned, but that's already not true today LOL, so
> I didn't bother to make it true when we detect bad
> sb magic, either...
> 
> I figure it's worth continuing and trying all superblocks
> in case just one has a corrupt magic.

Makes sense.

      reply	other threads:[~2014-05-28 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  2:03 [PATCH] btrfs-show-super: don't try to print not-superblocks Eric Sandeen
2014-05-28 16:07 ` David Sterba [this message]

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=20140528160730.GO5346@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=guihc.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).