path: root/Documentation
diff options
authorQu Wenruo <>2016-10-13 17:22:26 +0800
committerDavid Sterba <>2016-11-09 13:12:47 +0100
commiteb8a61b235ad035cc474bef78e10453ec3d11d72 (patch)
treeec41a685063f7a315e728abeeef31afd4031d110 /Documentation
parent08d31c1c7ca5a6bb4e6485fa118c552c938e9efb (diff)
btrfs-progs: check: add support to clear v1 free space cache
Kernel clear_cache mount option will only rebuild free space cache if the used space of that chunk has changed. So it won't ensure any corrupted free space cache get cleared. So add a new option "--clear-space-cache v1|v2" to btrfsck, to completely wipe out free space cache. So kernel won't complain again. Reported-by: Ivan P <> Signed-off-by: Qu Wenruo <> [ adjusted error messages, doc wording changes ] Signed-off-by: David Sterba <>
Diffstat (limited to 'Documentation')
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/btrfs-check.asciidoc b/Documentation/btrfs-check.asciidoc
index a32e1c7e..5ef414eb 100644
--- a/Documentation/btrfs-check.asciidoc
+++ b/Documentation/btrfs-check.asciidoc
@@ -78,6 +78,16 @@ respective superblock offset is within the device size
This can be used to use a different starting point if some of the primary
superblock is damaged.
+--clear-space-cache v1|v2::
+completely wipe all free space cache of given type
+NOTE: Only v1 free space cache supported is implemented.
+Kernel mount option 'clear_cache' is only designed to rebuild free space cache
+which is modified during the lifetime of that mount option. It doesn't rebuild
+all free space cache, nor clear them out.