From patchwork Mon May 7 03:10:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lu Fengqi X-Patchwork-Id: 10383173 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 DD64460353 for ; Mon, 7 May 2018 03:11:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE29D28478 for ; Mon, 7 May 2018 03:11:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C33B728B21; Mon, 7 May 2018 03:11:07 +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 6C81528478 for ; Mon, 7 May 2018 03:11:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbeEGDLF (ORCPT ); Sun, 6 May 2018 23:11:05 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:12219 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751874AbeEGDKt (ORCPT ); Sun, 6 May 2018 23:10:49 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="39622281" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 May 2018 11:10:48 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 25A984B34D23 for ; Mon, 7 May 2018 11:10:47 +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; Mon, 7 May 2018 11:10:48 +0800 From: Lu Fengqi To: Subject: [PATCH v3 10/10] btrfs-progs: undelete-subvol: update completion and documentation Date: Mon, 7 May 2018 11:10:33 +0800 Message-ID: <20180507031033.4125-11-lufq.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180507031033.4125-1-lufq.fnst@cn.fujitsu.com> References: <20180507031033.4125-1-lufq.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.155] X-yoursite-MailScanner-ID: 25A984B34D23.AAF51 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'