* [PATCH] btrfs-progs: dump-super: Don't verify csum if csum type or size is unknown
@ 2018-03-06 2:16 Qu Wenruo
2018-03-09 15:50 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2018-03-06 2:16 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba
Reported-by: Ken Swenson <flat@imo.uto.moe>
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
cmds-inspect-dump-super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c
index 150c2e5aedf4..85bff262ad85 100644
--- a/cmds-inspect-dump-super.c
+++ b/cmds-inspect-dump-super.c
@@ -339,7 +339,9 @@ static void dump_superblock(struct btrfs_super_block *sb, int full)
printf("csum\t\t\t0x");
for (i = 0, p = sb->csum; i < csum_size; i++)
printf("%02x", p[i]);
- if (check_csum_sblock(sb, csum_size))
+ if (csum_type != BTRFS_CSUM_TYPE_CRC32 || csum_size != BTRFS_CRC32_SIZE)
+ printf(" [UNKNOWN CSUM TYPE OR SIZE]");
+ else if (check_csum_sblock(sb, csum_size))
printf(" [match]");
else
printf(" [DON'T MATCH]");
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: dump-super: Don't verify csum if csum type or size is unknown
2018-03-06 2:16 [PATCH] btrfs-progs: dump-super: Don't verify csum if csum type or size is unknown Qu Wenruo
@ 2018-03-09 15:50 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2018-03-09 15:50 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs, dsterba
On Tue, Mar 06, 2018 at 10:16:51AM +0800, Qu Wenruo wrote:
> Reported-by: Ken Swenson <flat@imo.uto.moe>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-09 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06 2:16 [PATCH] btrfs-progs: dump-super: Don't verify csum if csum type or size is unknown Qu Wenruo
2018-03-09 15:50 ` David Sterba
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).