From patchwork Tue Mar 27 07:06:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lu Fengqi X-Patchwork-Id: 10309379 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 64A736037D for ; Tue, 27 Mar 2018 07:07:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 491C529BB6 for ; Tue, 27 Mar 2018 07:07:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DED429BB9; Tue, 27 Mar 2018 07:07:22 +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 947BE29BB6 for ; Tue, 27 Mar 2018 07:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbeC0HHU (ORCPT ); Tue, 27 Mar 2018 03:07:20 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:32429 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752066AbeC0HHT (ORCPT ); Tue, 27 Mar 2018 03:07:19 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="38221626" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 27 Mar 2018 15:07:14 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id B909148AE780 for ; Tue, 27 Mar 2018 15:07:12 +0800 (CST) Received: from fnst.localdomain (10.167.226.155) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 27 Mar 2018 15:07:14 +0800 From: Lu Fengqi To: Subject: [PATCH v2 10/10] btrfs-progs: undelete-subvol: update completion and documentation Date: Tue, 27 Mar 2018 15:06:58 +0800 Message-ID: <20180327070658.13064-11-lufq.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180327070658.13064-1-lufq.fnst@cn.fujitsu.com> References: <20180327070658.13064-1-lufq.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.155] X-yoursite-MailScanner-ID: B909148AE780.A9900 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 --- v2: just add -s option documentation. Documentation/btrfs-rescue.asciidoc | 12 ++++++++++++ btrfs-completion | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/btrfs-rescue.asciidoc b/Documentation/btrfs-rescue.asciidoc index f94a0ff2b45e..573a865b1158 100644 --- a/Documentation/btrfs-rescue.asciidoc +++ b/Documentation/btrfs-rescue.asciidoc @@ -60,6 +60,18 @@ assume an answer of 'yes' to all questions. -v:::: verbose mode. +*undelete-subvol* :: +Undelete 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". If -s option +is given, then just recover the subvolume which specified by . ++ +`Options` ++ +-s:::: +specify the subvolume which will be recovered. + *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'