From 1bff5b826177ae971eb986a261839dbeb76c8a74 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 17 Dec 2018 20:09:14 +0100 Subject: [PATCH] btrfs-progs: docs: enhance subvol show documentation and help There's a suggestion in #158 to improve the documenatation of the subvol show command so it's more obvious what kind of information it provides. I've updated the docs according to that and added an example that should make the request for creation time at least greppable, the overall description mentions 'times' so this should be enough as a pointer. Pull-request: #158 Suggested-by: Robert Pollak Signed-off-by: David Sterba --- Documentation/btrfs-subvolume.asciidoc | 28 ++++++++++++++++++-------- cmds-subvolume.c | 8 ++++---- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Documentation/btrfs-subvolume.asciidoc b/Documentation/btrfs-subvolume.asciidoc index f3eb4e26..49c72e89 100644 --- a/Documentation/btrfs-subvolume.asciidoc +++ b/Documentation/btrfs-subvolume.asciidoc @@ -171,21 +171,33 @@ path. The id can be obtained from *btrfs subvolume list*, *btrfs subvolume show* or *btrfs inspect-internal rootid*. -*show* [options] |:: -Show information of a given subvolume in the . +*show* [options] :: +Show more information about subvolume regarding UUIDs, times, +generations, flags and related snapshots. ++ +---------- +/mnt/btrfs/subvolume + Name: subvolume + UUID: 5e076a14-4e42-254d-ac8e-55bebea982d1 + Parent UUID: - + Received UUID: - + Creation time: 2018-01-01 12:34:56 +0000 + Subvolume ID: 79 + Generation: 2844 + Gen at creation: 2844 + Parent ID: 5 + Top level ID: 5 + Flags: - + Snapshot(s): +---------- + `Options` + -r|--rootid:::: rootid of the subvolume. --u|--uuid::: +-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|-i ] |[/]:: Create a snapshot of the subvolume with the name in the directory. diff --git a/cmds-subvolume.c b/cmds-subvolume.c index a8395aac..c69d3705 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -912,13 +912,13 @@ static int cmd_subvol_find_new(int argc, char **argv) } static const char * const cmd_subvol_show_usage[] = { - "btrfs subvolume show [options] |", - "Show more information about the subvolume", + "btrfs subvolume show [options] ", + "Show more information about the subvolume (UUIDs, generations, times, snapshots)", "-r|--rootid rootid of the subvolume", "-u|--uuid uuid of the subvolume", "", - "If no option is specified, will be shown, otherwise", - "the rootid or uuid are resolved relative to the path.", + "If no option is specified, subvolume at will be shown, otherwise", + "the rootid or uuid are resolved relative to the .", NULL };