Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs-progs: docs: improve space cache documentation #571

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions Documentation/btrfs-check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,9 @@ SAFE OR ADVISORY OPTIONS
superblock is damaged.

--clear-space-cache v1|v2
completely wipe all free space cache of given type
completely remove the free space cache of the given version

For free space cache *v1*, the *clear_cache* kernel mount option only rebuilds
the free space cache for block groups that are modified while the filesystem is
mounted with that option. Thus, using this option with *v1* makes it possible
to actually clear the entire free space cache.

For free space cache *v2*, the *clear_cache* kernel mount option destroys
the entire free space cache. This option, with *v2* provides an alternative
method of clearing the free space cache that doesn't require mounting the
filesystem.
See also the *clear_cache* mount option.

--clear-ino-cache
remove leftover items pertaining to the deprecated inode map feature
Expand Down
18 changes: 15 additions & 3 deletions Documentation/ch-mount-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,19 @@ check_int, check_int_data, check_int_print_mask=<value>
for more information.

clear_cache
Force clearing and rebuilding of the disk space cache if something
has gone wrong. See also: *space_cache*.
Force clearing and rebuilding of the free space cache if something
has gone wrong.

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

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

See also: *space_cache*.

commit=<seconds>
(since: 3.12, default: 30)
Expand Down Expand Up @@ -351,7 +362,8 @@ space_cache, space_cache=<version>, nospace_cache
implementation, which adds a new b-tree called the free space tree, addresses
this issue. Once enabled, the *v2* space cache will always be used and cannot
be disabled unless it is cleared. Use *clear_cache,space_cache=v1* or
*clear_cache,nospace_cache* to do so. If *v2* is enabled, kernels without *v2*
*clear_cache,nospace_cache* to do so. If *v2* is enabled, and *v1* space
cache will be cleared (at the first mount) and kernels without *v2*
support will only be able to mount the filesystem in read-only mode.

The :doc:`btrfs-check(8)<btrfs-check>` and `:doc:`mkfs.btrfs(8)<mkfs.btrfs>` commands have full *v2* free space
Expand Down