From patchwork Mon Jun 18 08:40:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Misono Tomohiro X-Patchwork-Id: 10470215 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 24A66600CC for ; Mon, 18 Jun 2018 08:43:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 153E828448 for ; Mon, 18 Jun 2018 08:43:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07EE3287E7; Mon, 18 Jun 2018 08:43:10 +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 6D49A28448 for ; Mon, 18 Jun 2018 08:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968283AbeFRIlt (ORCPT ); Mon, 18 Jun 2018 04:41:49 -0400 Received: from mgwym03.jp.fujitsu.com ([211.128.242.42]:18223 "EHLO mgwym03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968195AbeFRIiN (ORCPT ); Mon, 18 Jun 2018 04:38:13 -0400 Received: from yt-mxoi1.gw.nic.fujitsu.com (unknown [192.168.229.67]) by mgwym03.jp.fujitsu.com with smtp id 2676_9ffc_35257c31_a3ce_4efc_8e0a_43fc3e9127c1; Mon, 18 Jun 2018 17:38:08 +0900 Received: from g01jpfmpwkw03.exch.g01.fujitsu.local (g01jpfmpwkw03.exch.g01.fujitsu.local [10.0.193.57]) by yt-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id B103BAC0185 for ; Mon, 18 Jun 2018 17:38:08 +0900 (JST) Received: from g01jpexchkw33.g01.fujitsu.local (unknown [10.0.193.4]) by g01jpfmpwkw03.exch.g01.fujitsu.local (Postfix) with ESMTP id D4F2ABD65F4 for ; Mon, 18 Jun 2018 17:38:07 +0900 (JST) Received: from luna3.soft.fujitsu.com (10.124.196.199) by g01jpexchkw33.g01.fujitsu.local (10.0.193.36) with Microsoft SMTP Server id 14.3.352.0; Mon, 18 Jun 2018 17:38:05 +0900 From: Misono Tomohiro To: Subject: [PATCH v2 01/20] btrfs-progs: doc: Update man btrfs subvolume Date: Mon, 18 Jun 2018 17:40:49 +0900 Message-ID: <812810057f55e9942516b3d4984a2647b90b2209.1529310485.git.misono.tomohiro@jp.fujitsu.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: References: MIME-Version: 1.0 X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable 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 Some information is obsolete and updated as follows: - Add missing explanations of some options - Remove outdated explanation of "subvolrootid" mount option - Reorder/group options of "sub list" to corresponds help message - Add explanation about different meaning of parent in "parent ID/UUID" - Fix indent/misspelling - Add missing comma Signed-off-by: Misono Tomohiro --- Documentation/btrfs-subvolume.asciidoc | 77 ++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/Documentation/btrfs-subvolume.asciidoc b/Documentation/btrfs-subvolume.asciidoc index a8c4af4b..f3eb4e26 100644 --- a/Documentation/btrfs-subvolume.asciidoc +++ b/Documentation/btrfs-subvolume.asciidoc @@ -77,13 +77,16 @@ safely stored on the device. `Options` + -c|--commit-after:::: -wait for transaction commit at the end of the operation +wait for transaction commit at the end of the operation. + -C|--commit-each:::: -wait for transaction commit after deleting each subvolume +wait for transaction commit after deleting each subvolume. ++ +-v|--verbose:::: +verbose output of operations. *find-new* :: -List the recently modified files in a subvolume, after ID. +List the recently modified files in a subvolume, after generation. *get-default* :: Get the default subvolume of the filesystem . @@ -93,40 +96,54 @@ The output format is similar to *subvolume list* command. *list* [options] [-G [\+|-]] [-C [+|-]] [--sort=rootid,gen,ogen,path] :: List the subvolumes present in the filesystem . + -For every subvolume the following information is shown by default. + -ID top level path + -where path is the relative path of the subvolume to the top level subvolume. +For every subvolume the following information is shown by default: ++ +ID gen top level path ++ +where ID is subvolume's id, gen is an internal counter which is updated +every transaction, top level is the same as parent subvolume's id, and +path is the relative path of the subvolume to the top level subvolume. The subvolume's ID may be used by the subvolume set-default command, or at mount time via the subvolid= option. -If `-p` is given, then parent is added to the output between ID -and top level. The parent's ID may be used at mount time via the -`subvolrootid=` option. + `Options` + --p:::: -print parent ID. +Path filtering;; +-o:::: +print only subvolumes below specified . -a:::: print all the subvolumes in the filesystem and distinguish between absolute and relative path with respect to the given . + +Field selection;; +-p:::: +print the parent ID +('parent' here means the subvolume which contains this subvolume). -c:::: print the ogeneration of the subvolume, aliases: ogen or origin generation. -g:::: -print the generation of the subvolume. --o:::: -print only subvolumes below specified . +print the generation of the subvolume (default). -u:::: print the UUID of the subvolume. -q:::: -print the parent uuid of subvolumes (and snapshots). +print the parent UUID of the subvolume +('parent' here means subvolume of which this subvolume is a snapshot). -R:::: -print the UUID of the sent subvolume, where the subvolume is the result of a receive operation --t:::: -print the result as a table. +print the UUID of the sent subvolume, where the subvolume is the result of a receive operation. + +Type filtering;; -s:::: only snapshot subvolumes in the filesystem will be listed. -r:::: only readonly subvolumes in the filesystem will be listed. +-d:::: +list deleted subvolumes that are not yet cleaned. + +Other;; +-t:::: +print the result as a table. + +Sorting;; -G [+|-]:::: list subvolumes in the filesystem that its generation is >=, \<= or = value. \'\+' means >= value, \'-' means \<= value, If there is @@ -144,9 +161,9 @@ for --sort you can combine some items together by \',', just like *set-default* [| ]:: Set the default subvolume for the (mounted) filesystem. - ++ Set the default subvolume for the (mounted) filesystem at . This will hide -the top-level subvolume (ie. the one mounted with 'subvol=/' or 'subvolid=5'). +the top-level subvolume (i.e. the one mounted with 'subvol=/' or 'subvolid=5'). Takes action on next mount. + There are two ways how to specify the subvolume, by or by the @@ -154,10 +171,22 @@ path. The id can be obtained from *btrfs subvolume list*, *btrfs subvolume show* or *btrfs inspect-internal rootid*. -*show* :: +*show* [options] |:: Show information of a given subvolume in the . ++ +`Options` ++ +-r|--rootid:::: +rootid of the subvolume. +-u|--uuid::: +UUID of the subvolume. + ++ +If no option is specified, subvolume information of is shown, +otherwise the subvolume information of rootid or UUID in the filesystem +is shown. -*snapshot* [-r] |[/]:: +*snapshot* [-r|-i ] |[/]:: Create a snapshot of the subvolume with the name in the directory. + @@ -168,6 +197,10 @@ If is not a subvolume, btrfs returns an error. + -r:::: Make the new snapshot read only. ++ +-i :::: +Add the newly created subvolume to a qgroup. This option can be given multiple +times. *sync* [subvolid...]:: Wait until given subvolume(s) are completely removed from the filesystem after