summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2014-05-13 21:03:04 -0500
committerDavid Sterba <dsterba@suse.cz>2014-08-22 14:39:31 +0200
commitfd518cfcb1fdb49ec4e5f09c397d16abb36178b8 (patch)
tree49e4e65e42f14d1f49c98a53092a953c61d37220 /Documentation
parentda65695cc5f600c0f70efefd36c87d229e1ed3b4 (diff)
btrfs-show-super: don't try to print not-superblocks
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. Fix some spelling & capitalization while we're at it. 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. Signed-off-by: Eric Sandeen <sandeen@redhat.com> [renamed -f to -F due to clash with existing option, converted relevant docs to asciidoc] Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/btrfs-show-super.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/btrfs-show-super.txt b/Documentation/btrfs-show-super.txt
index e06157f5..62da6259 100644
--- a/Documentation/btrfs-show-super.txt
+++ b/Documentation/btrfs-show-super.txt
@@ -31,6 +31,10 @@ Specify which mirror to print out.
<super_mirror> is between 0 and 2.
If several '-i <super_mirror>' are given, only the last one is valid.
+-F::
+Attempt to print the superblock even if no superblock magic is found. May end
+badly.
+
EXIT STATUS
-----------
*btrfs-show-super* will return 0 if no error happened.