diff options
author | Misono, Tomohiro <misono.tomohiro@jp.fujitsu.com> | 2017-10-06 10:05:08 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-11-14 15:59:00 +0100 |
commit | 4a5b95abb620175ca6eb356ff8a7d698891fa8ab (patch) | |
tree | 064a6f191eee6e7f43142aa8f19ba3d16e9511ad /Documentation | |
parent | c56d61883c6f093ac905c49f76a99be5e8e09332 (diff) |
btrfs-progs: subvol: change set-default to also accept path
This patch changes "subvol set-default" to also accept the subvolume path
for convenience.
If there are two args, they are assumed as subvol id and path to the fs
(the same as current behavior), and if there is only one arg, it is assumed
as the path to the subvolume.
subvol id is resolved by test_issubvolume() + lookup_path_rootid().
The empty subvol (ino == 2) will get error on test_issubvolume() which
checks whether inode num is 256 or not.
Issue: #35
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
[ update documentation, use the new multi-line command scheme ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/btrfs-subvolume.asciidoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/btrfs-subvolume.asciidoc b/Documentation/btrfs-subvolume.asciidoc index 5cfe8856..d33fee5a 100644 --- a/Documentation/btrfs-subvolume.asciidoc +++ b/Documentation/btrfs-subvolume.asciidoc @@ -142,12 +142,13 @@ you can add \'\+' or \'-' in front of each items, \'+' means ascending, for --sort you can combine some items together by \',', just like --sort=+ogen,-gen,path,rootid. -*set-default* <id> <path>:: -Set the subvolume of the filesystem <path> which is mounted as -default. +*set-default* [<subvolume>|<id> <path>]:: +Set the default subvolume of the (mounted) filesystem. + -The subvolume is identified by <id>, which is returned by the *subvolume list* -command. +There are two ways how to specify the subvolume, by <id> or by the <subvolume> +path. +The id can be obtained from *btrfs subvolume list*, *btrfs subvolume show* or +*btrfs inspect-internal rootid*. *show* <path>:: Show information of a given subvolume in the <path>. |