From patchwork Thu Feb 28 14:44:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 10833229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65282180E for ; Thu, 28 Feb 2019 14:45:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557132EC1A for ; Thu, 28 Feb 2019 14:45:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4847B2F067; Thu, 28 Feb 2019 14:45:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3E5C2945F for ; Thu, 28 Feb 2019 14:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733127AbfB1Oo7 (ORCPT ); Thu, 28 Feb 2019 09:44:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:53348 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733119AbfB1Oo4 (ORCPT ); Thu, 28 Feb 2019 09:44:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 94BE3ACE7 for ; Thu, 28 Feb 2019 14:44:55 +0000 (UTC) From: Johannes Thumshirn To: Linux BTRFS Mailinglist Cc: Johannes Thumshirn Subject: [RFC PATCH 0/2] btrfs-progs: provide command to dump checksums Date: Thu, 28 Feb 2019 15:44:30 +0100 Message-Id: <20190228144432.17038-1-jthumshirn@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide a command to dump checksums from 'btrfs inspect-internal'. This then does a lookup for the given file's extents and walks the csum tree printing all checksums of an extent. This is marked as an RFC because up to now I've only tested it on simple files created with 'xfs_io -f -c "pwrite 0 $SIZE"', but like to hear some feedback. It is also missing some tests to check implementation and provide regression tests for eventual bugs. It is also available on github @ https://github.com/morbidrsa/btrfs-progs/tree/inspect-csums Johannes Thumshirn (2): btrfs-progs: add 'btrfs inspect-internal csum-dump' command btrfs-progs: completion: wire-up dump-csum Makefile | 3 +- btrfs-completion | 4 +- cmds-inspect-dump-csum.c | 266 +++++++++++++++++++++++++++++++++++++++++++++++ cmds-inspect.c | 2 + commands.h | 2 + 5 files changed, 274 insertions(+), 3 deletions(-) create mode 100644 cmds-inspect-dump-csum.c