From patchwork Fri Feb 2 08:27:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lu Fengqi X-Patchwork-Id: 10196381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0892860362 for ; Fri, 2 Feb 2018 08:28:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA34228BF2 for ; Fri, 2 Feb 2018 08:28:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF12F28E1C; Fri, 2 Feb 2018 08:28:27 +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=-6.9 required=2.0 tests=BAYES_00,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 834CD28BF2 for ; Fri, 2 Feb 2018 08:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751135AbeBBI2Z (ORCPT ); Fri, 2 Feb 2018 03:28:25 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:8752 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751886AbeBBI2L (ORCPT ); Fri, 2 Feb 2018 03:28:11 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="36672990" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 02 Feb 2018 16:28:07 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id BA1A149F19BA for ; Fri, 2 Feb 2018 16:28:05 +0800 (CST) Received: from localhost.localdomain (10.167.226.155) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 2 Feb 2018 16:28:03 +0800 From: Lu Fengqi To: Subject: [PATCH 10/10] btrfs-progs: undelete-subvol: update completion and documentation Date: Fri, 2 Feb 2018 16:27:51 +0800 Message-ID: <20180202082751.26225-11-lufq.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202082751.26225-1-lufq.fnst@cn.fujitsu.com> References: <20180202082751.26225-1-lufq.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.155] X-yoursite-MailScanner-ID: BA1A149F19BA.AC3FE X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: lufq.fnst@cn.fujitsu.com 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 Add undelete-subvol to btrfs-completion, and update btrfs-rescue documentation to introduce undelete-subvol. Signed-off-by: Lu Fengqi --- Documentation/btrfs-rescue.asciidoc | 6 ++++++ btrfs-completion | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/btrfs-rescue.asciidoc b/Documentation/btrfs-rescue.asciidoc index 743a23a64287..9c6fbd82ef2d 100644 --- a/Documentation/btrfs-rescue.asciidoc +++ b/Documentation/btrfs-rescue.asciidoc @@ -60,6 +60,12 @@ assume an answer of 'yes' to all questions. -v:::: verbose mode. +*undelete-subvol* :: +Undelete all deleted subvolumes that still left intact on the device. ++ +This command will create the lost+found directory, and recover all the +subvolumes to this directory with the name "sub". + *zero-log* :: clear the filesystem log tree + diff --git a/btrfs-completion b/btrfs-completion index ae683f4ecf61..859595155a4b 100644 --- a/btrfs-completion +++ b/btrfs-completion @@ -35,7 +35,7 @@ _btrfs() commands_balance='start pause cancel resume status' commands_device='scan add delete remove ready stats usage' commands_scrub='start cancel resume status' - commands_rescue='chunk-recover super-recover zero-log' + commands_rescue='chunk-recover super-recover undelete-subvol zero-log' commands_inspect_internal='inode-resolve logical-resolve subvolid-resolve rootid min-dev-size dump-tree dump-super tree-stats' commands_property='get set list' commands_quota='enable disable rescan'