From patchwork Tue Nov 25 15:57:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 5380371 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 34115C11AC for ; Tue, 25 Nov 2014 15:58:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 806CE201C0 for ; Tue, 25 Nov 2014 15:57:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C685E200F3 for ; Tue, 25 Nov 2014 15:57:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751289AbaKYP5n (ORCPT ); Tue, 25 Nov 2014 10:57:43 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:36774 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbaKYP5l (ORCPT ); Tue, 25 Nov 2014 10:57:41 -0500 Received: by mail-wi0-f178.google.com with SMTP id hi2so1931930wib.11 for ; Tue, 25 Nov 2014 07:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o0ECYmPdPytqlOGLnjAUOpn7QbLDzrmu4bNSCVK8TeE=; b=tzX07OxWxQn0TFLYpkIHqMInAd4HBkskkofbFdvxHZhaz7mQ6A2L7P/2GpZOlYFdW1 L3buRvsA2JOmPsDYp3+cKVYwqBdUjWbGUjJnuJd1qAG4kEqTDGB2K9r7BUADAd/DFsaF +bk0+ILq/QUYwJfISHTatCmr0gLQ+V68QSPn9FCgxzIt1pUazhRgNrCw3UrNjiVTUB0A loqq2r41ZvZP5yePTqGx3/1vWGzhzYkzJuWLrscuO0nUfBEfEcTJePpadDRzjoy76SCy pSlxpRxKZzPT3swi0GrnIB/BFmgoW5XwGz0b95+jN695sI6yyEg0B+/DJa+hoR/oJeTC 1tLg== X-Received: by 10.180.221.72 with SMTP id qc8mr33000375wic.19.1416931060777; Tue, 25 Nov 2014 07:57:40 -0800 (PST) Received: from venice.bhome (ppp-131-78.24-151.libero.it. [151.24.78.131]) by mx.google.com with ESMTPSA id n8sm2457641wjx.0.2014.11.25.07.57.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Nov 2014 07:57:40 -0800 (PST) From: Goffredo Baroncelli X-Google-Original-From: Goffredo Baroncelli To: linux-btrfs@vger.kernel.org Cc: David Sterba , Goffredo Baroncelli Subject: [PATCH 3/4] Add the btrfs chunk list command Date: Tue, 25 Nov 2014 16:57:24 +0100 Message-Id: <1416931045-24259-4-git-send-email-kreijack@inwind.it> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1416931045-24259-1-git-send-email-kreijack@inwind.it> References: <1416931045-24259-1-git-send-email-kreijack@inwind.it> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the 'btrfs chunk' groups command. Signed-off-by: Goffredo Baroncelli --- Makefile | 2 +- btrfs.c | 1 + commands.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4cae30c..1744f9c 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \ cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \ cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \ cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \ - cmds-property.o + cmds-property.o cmds-chunk.o libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o \ uuid-tree.o utils-lib.o rbtree-utils.o libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \ diff --git a/btrfs.c b/btrfs.c index e83349c..25fbb71 100644 --- a/btrfs.c +++ b/btrfs.c @@ -197,6 +197,7 @@ static const struct cmd_group btrfs_cmd_group = { { "device", cmd_device, NULL, &device_cmd_group, 0 }, { "scrub", cmd_scrub, NULL, &scrub_cmd_group, 0 }, { "check", cmd_check, cmd_check_usage, NULL, 0 }, + { "chunk", cmd_chunk, NULL, &chunk_cmd_group, 0 }, { "rescue", cmd_rescue, NULL, &rescue_cmd_group, 0 }, { "restore", cmd_restore, cmd_restore_usage, NULL, 0 }, { "inspect-internal", cmd_inspect, NULL, &inspect_cmd_group, 0 }, diff --git a/commands.h b/commands.h index 4d870f6..41d69b0 100644 --- a/commands.h +++ b/commands.h @@ -80,6 +80,7 @@ extern const struct cmd_group filesystem_cmd_group; extern const struct cmd_group balance_cmd_group; extern const struct cmd_group device_cmd_group; extern const struct cmd_group scrub_cmd_group; +extern const struct cmd_group chunk_cmd_group; extern const struct cmd_group inspect_cmd_group; extern const struct cmd_group property_cmd_group; extern const struct cmd_group quota_cmd_group; @@ -101,6 +102,7 @@ int cmd_balance(int argc, char **argv); int cmd_device(int argc, char **argv); int cmd_scrub(int argc, char **argv); int cmd_check(int argc, char **argv); +int cmd_chunk(int argc, char **argv); int cmd_chunk_recover(int argc, char **argv); int cmd_super_recover(int argc, char **argv); int cmd_inspect(int argc, char **argv);