From eb8a61b235ad035cc474bef78e10453ec3d11d72 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Thu, 13 Oct 2016 17:22:26 +0800 Subject: 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 --- Documentation/btrfs-check.asciidoc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation') 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. + + DANGEROUS OPTIONS ----------------- -- cgit v1.2.3