Skip to content

Commit d6d4e6f

Browse files
committed
btrfs-progs: docs: further improve space cache documentation
- For the btrfs check option of clearing, indicate that - since it's actually a full removing - a new space cache may be generated on the next mount. - In the summary of the `clear_cache` mount option, don't mention that it rebuilds the cache, as the option itself is in principle only about the clearing and the rebuilding happens "automatically" (unless other options are used). - In the details mention, however that there is rebuilding unless prevented by mount option. - Remove the "if something has gone wrong", as the mount option would also remove the cache if nothing went wrong. Signed-off-by: Christoph Anton Mitterer <[email protected]>
1 parent f560eb4 commit d6d4e6f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Documentation/btrfs-check.rst

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ SAFE OR ADVISORY OPTIONS
8181
--clear-space-cache v1|v2
8282
completely remove the free space cache of the given version
8383

84+
When the filesystem is mounted afterwards, a new space cache may be generated
85+
depending on mount options and/or kernel defaults.
8486
See also the *clear_cache* mount option.
8587

8688
--clear-ino-cache

Documentation/ch-mount-options.rst

+8-6
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,20 @@ check_int, check_int_data, check_int_print_mask=<value>
8989
for more information.
9090

9191
clear_cache
92-
Force clearing and rebuilding of the free space cache if something
93-
has gone wrong.
92+
Force clearing of the free space cache.
9493

95-
For free space cache *v1*, this only clears (and, unless *nospace_cache* is
96-
used, rebuilds) the free space cache for block groups that are modified while
97-
the filesystem is mounted with that option. To actually clear an entire free
98-
space cache *v1*, see :command:`btrfs check --clear-space-cache v1`.
94+
For free space cache *v1*, this only clears the free space cache for block
95+
groups that are modified while the filesystem is mounted with that option.
96+
To actually clear the entire free space cache *v1*, see
97+
:command:`btrfs check --clear-space-cache v1`.
9998

10099
For free space cache *v2*, this clears the entire free space cache.
101100
To do so without requiring to mounting the filesystem, see
102101
:command:`btrfs check --clear-space-cache v2`.
103102

103+
For both versions, unless *nospace_cache* is used, the cleared parts of
104+
the free space cache are also rebuild.
105+
104106
See also: *space_cache*.
105107

106108
commit=<seconds>

0 commit comments

Comments
 (0)