Skip to content

Commit cf3eb3b

Browse files
committed
btrfs-progs: docs: update quota pages
As reported, some of the information is not up to date regarding status. Issue: #996 Signed-off-by: David Sterba <dsterba@suse.com>
1 parent b6ce282 commit cf3eb3b

File tree

3 files changed

+28
-36
lines changed

3 files changed

+28
-36
lines changed

Documentation/btrfs-qgroup.rst

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ DESCRIPTION
1313

1414
.. note::
1515
To use qgroup you need to enable quota first using :command:`btrfs quota enable`
16-
command.
17-
18-
.. warning::
19-
Qgroup is not stable yet and will impact performance in current mainline
20-
kernel (v4.14).
16+
command, see :doc:`btrfs-quota`.
2117

2218
QGROUP
2319
------
@@ -26,10 +22,10 @@ Quota groups or qgroup in btrfs make a tree hierarchy, the leaf qgroups are
2622
attached to subvolumes. The size limits are set per qgroup and apply when any
2723
limit is reached in tree that contains a given subvolume.
2824

29-
The limits are separated between shared and exclusive and reflect the extent
25+
The limits are separated between *shared* and *exclusive* and reflect the extent
3026
ownership. For example a fresh snapshot shares almost all the blocks with the
3127
original subvolume, new writes to either subvolume will raise towards the
32-
exclusive limit.
28+
exclusive limit. Extent sharing is also result of *reflink* or *deduplication*.
3329

3430
.. note::
3531
Qgroup limit only works when qgroup is in a consistent state.
@@ -40,11 +36,12 @@ exclusive limit.
4036
The qgroup identifiers conform to *level/id* where level 0 is reserved to the
4137
qgroups associated with subvolumes. Such qgroups are created automatically.
4238

43-
The qgroup hierarchy is built by commands :command:`create` and :command:`assign`.
39+
The qgroup hierarchy is built by commands :command:`btrfs qgroup create` and
40+
:command:`btrfs qgroup assign`.
4441

4542
.. note::
46-
If the qgroup of a subvolume is destroyed, quota about the subvolume will
47-
not be functional until qgroup *0/<subvolume id>* is created again.
43+
If the qgroup of a subvolume is destroyed, quota related to the subvolume
44+
will not be functional until qgroup *0/<subvolume id>* is created again.
4845

4946
SUBCOMMAND
5047
----------
@@ -78,8 +75,9 @@ destroy <qgroupid> <path>
7875

7976
clear-stale <path>
8077
Clear all stale qgroups whose subvolume does not exist anymore, this is the
81-
level 0 qgroup like 0/subvolid. Higher level qgroups are not deleted even
82-
if they don't have any child qgroups.
78+
level 0 qgroup like *0/subvolid*. Higher level qgroups are not deleted even
79+
if they don't have any child qgroups as they are always created by the
80+
user and their deletion should be verified first.
8381

8482
limit [options] <size>|none [<qgroupid>] <path>
8583
Limit the size of a qgroup to *size* or no limit in the btrfs filesystem
@@ -161,21 +159,21 @@ show [options] <path>
161159

162160
SPECIAL PATHS
163161
-------------
164-
For `btrfs qgroup show` subcommand, the ``path`` column may has some special
165-
strings:
162+
For :command:`btrfs qgroup show` command, the :file:`path` column can print
163+
special values:
166164

167165
`<toplevel>`
168-
The toplevel subvolume
166+
The toplevel subvolume.
169167

170168
`<under deletion>`
171-
The subvolume has been deleted (it's directory removed), but the
169+
The subvolume has been deleted (its directory removed), but the
172170
subvolume metadata not not yet fully cleaned.
173171

174172
`<squota space holder>`
175-
For simple quota mode only.
173+
For *simple quota* mode only.
176174
By its design, a fully deleted subvolume may still have accounting on
177-
it, so even the subvolume is gone, the numbers are still here for future
178-
accounting.
175+
it, so even if the subvolume is gone, the numbers are still here for
176+
future accounting.
179177

180178
`<stale>`
181179
The qgroup has no corresponding subvolume anymore, and the qgroup
@@ -190,7 +188,7 @@ QUOTA RESCAN
190188
The rescan reads all extent sharing metadata and updates the respective qgroups
191189
accordingly.
192190

193-
The information consists of bytes owned exclusively (*excl*) or shared/referred
191+
The information consists of bytes owned exclusively (*excl*) or shared/referenced
194192
to (*rfer*). There's no explicit information about which extents are shared or
195193
owned exclusively. This means when qgroup relationship changes, extent owners
196194
change and qgroup numbers are no longer consistent unless we do a full rescan.

Documentation/btrfs-quota.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,16 @@ of a btrfs filesystem. The quota groups (qgroups) are managed by the subcommand
1919
:ref:`HIERARCHICAL QUOTA GROUP CONCEPTS<man-quota-hierarchical-quota-group-concepts>`
2020
for a detailed description.
2121

22-
PERFORMANCE IMPLICATIONS
23-
^^^^^^^^^^^^^^^^^^^^^^^^
22+
STABILITY AND PERFORMANCE IMPLICATIONS
23+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
The qgroup implementation is considered reasonably stable for daily use and has
26+
been enabled in various distributions.
2427

2528
When quotas are activated, they affect all extent processing, which takes a
2629
performance hit. Activation of qgroups is not recommended unless the user
2730
intends to actually use them.
2831

29-
STABILITY STATUS
30-
^^^^^^^^^^^^^^^^
31-
32-
The qgroup implementation has turned out to be quite difficult as it affects
33-
the core of the filesystem operation. Qgroup users have hit various corner cases
34-
over time, such as incorrect accounting or system instability. The situation is
35-
gradually improving and issues found and fixed.
36-
3732
.. _man-quota-hierarchical-quota-group-concepts:
3833

3934
HIERARCHICAL QUOTA GROUP CONCEPTS

Documentation/ch-quota-intro.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on the fly.
1111

1212
On the other hand, the traditional approach has only a poor solution to
1313
restrict directories.
14-
At installation time, the harddisk can be partitioned so that every directory
14+
At installation time, the storage device can be partitioned so that every directory
1515
(e.g. :file:`/usr`, :file:`/var`, ...) that needs a limit gets its own partition. The obvious
1616
problem is that those limits cannot be changed without a reinstallation. The
1717
btrfs subvolume feature builds a bridge. Subvolumes correspond in many ways to
@@ -37,7 +37,8 @@ space and the amount of exclusively referenced space.
3737

3838
referenced
3939
space is the amount of data that can be reached from any of the
40-
subvolumes contained in the qgroup, while
40+
subvolumes contained in the qgroup
41+
4142
exclusive
4243
is the amount of data where all references to this data can be reached
4344
from within this qgroup.
@@ -50,12 +51,12 @@ qgroup. Qgroups are notated as *level/id*, e.g. the qgroup 3/2 is a qgroup of
5051
level 3. For level 0, the leading *0/* can be omitted.
5152
Qgroups of level 0 get created automatically when a subvolume/snapshot gets
5253
created. The ID of the qgroup corresponds to the ID of the subvolume, so 0/5
53-
is the qgroup for the root subvolume.
54+
is the qgroup for the toplevel subvolume.
5455
For the :command:`btrfs qgroup` command, the path to the subvolume can also be used
5556
instead of *0/ID*. For all higher levels, the ID can be chosen freely.
5657

5758
Each qgroup can contain a set of lower level qgroups, thus creating a hierarchy
58-
of qgroups. Figure 1 shows an example qgroup tree.
59+
of qgroups. Here's an example of qgroup tree:
5960

6061
.. code-block:: none
6162
@@ -75,8 +76,6 @@ of qgroups. Figure 1 shows an example qgroup tree.
7576
| / \ / \
7677
extents 1 2 3 4
7778
78-
Figure 1: Sample qgroup hierarchy
79-
8079
At the bottom, some extents are depicted showing which qgroups reference which
8180
extents. It is important to understand the notion of *referenced* vs
8281
*exclusive*. In the example, qgroup 0/2 references extents 2 and 3, while 1/2

0 commit comments

Comments
 (0)