btrfs-progs: doc: update qgroup docs

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2015-07-27 17:36:03 +02:00
parent e5a6610c94
commit c78f3eea94
2 changed files with 18 additions and 14 deletions

View File

@ -11,25 +11,29 @@ SYNOPSIS
DESCRIPTION DESCRIPTION
----------- -----------
*btrfs qgroup* is used to control quota group(qgroup) of a btrfs filesystem. *btrfs qgroup* is used to control quota group (qgroup) of a btrfs filesystem.
NOTE: To use qgroup, it needs to enable quota first using *btrfs quota* NOTE: To use qgroup you need to enable quota first using *btrfs quota enable*
command. command.
WARNING: Qgroup is not stable yet and will impact performance in current mainline WARNING: Qgroup is not stable yet and will impact performance in current mainline
kernel(v3.14 so far). kernel (v3.14 so far).
QGROUP QGROUP
------ ------
Quota group or qgroup in btrfs has its hierarchy like subvolume. Quota groups or qgroup in btrfs make a tree hierarchy, the leaf qgroups are
One subvolume/snapshot can reach its quota limits if it consumes all the quota attached to subvolumes. The size limits are set per qgroup and apply when any
assigned to it or any of the parent qgroup(s). limit is reached in tree that contains a given subvolume.
Also for snapshot, it consumes no quota initially since all its data The limit sare separated between shared and exclusive and reflect the extent
shares with its parent, so only modification in snapshot consumes quota. ownership. For example a fresh snapshot shares almost all the blocks with the
original subvolume, new writes to either subvolume will raise towards the
exclusive limit.
Every subvolume/snapshot will have its own qgroup with id '0/<subvolume id>' The qgroup identifiers conform to 'level/id' where level 0 is reserved to the
upon creating, but can be later destroyed by *btrfs qgroup destroy* command. qgroups associated with subvolumes. Such qgroups are created automatically.
The qgroup hierarchy is built by commands *create* and *assign*.
NOTE: If the qgroup of a subvolume is destroyed, quota about the subvolume NOTE: If the qgroup of a subvolume is destroyed, quota about the subvolume
will not be functional until qgroup '0/<subvolume id>' is created again. will not be functional until qgroup '0/<subvolume id>' is created again.

View File

@ -206,7 +206,7 @@ static int parse_limit(const char *p, unsigned long long *s)
static const char * const cmd_qgroup_assign_usage[] = { static const char * const cmd_qgroup_assign_usage[] = {
"btrfs qgroup assign [options] <src> <dst> <path>", "btrfs qgroup assign [options] <src> <dst> <path>",
"Enable subvolume qgroup support for a filesystem.", "Assign SRC as the child qgroup of DST",
"", "",
"--rescan schedule qutoa rescan if needed", "--rescan schedule qutoa rescan if needed",
"--no-rescan ", "--no-rescan ",
@ -223,7 +223,7 @@ static int cmd_qgroup_assign(int argc, char **argv)
static const char * const cmd_qgroup_remove_usage[] = { static const char * const cmd_qgroup_remove_usage[] = {
"btrfs qgroup remove <src> <dst> <path>", "btrfs qgroup remove <src> <dst> <path>",
"Remove a subvol from a quota group.", "Remove a child qgroup SRC from DST.",
NULL NULL
}; };
@ -251,7 +251,7 @@ static int cmd_qgroup_create(int argc, char **argv)
static const char * const cmd_qgroup_destroy_usage[] = { static const char * const cmd_qgroup_destroy_usage[] = {
"btrfs qgroup destroy <qgroupid> <path>", "btrfs qgroup destroy <qgroupid> <path>",
"Destroy a subvolume quota group.", "Destroy a quota group.",
NULL NULL
}; };
@ -419,7 +419,7 @@ static int cmd_qgroup_show(int argc, char **argv)
static const char * const cmd_qgroup_limit_usage[] = { static const char * const cmd_qgroup_limit_usage[] = {
"btrfs qgroup limit [options] <size>|none [<qgroupid>] <path>", "btrfs qgroup limit [options] <size>|none [<qgroupid>] <path>",
"Limit the size of a subvolume quota group.", "Set the limits a subvolume quota group.",
"", "",
"-c limit amount of data after compression. This is the default,", "-c limit amount of data after compression. This is the default,",
" it is currently not possible to turn off this option.", " it is currently not possible to turn off this option.",