btrfs-progs/check
Qu Wenruo 87b3197d81 btrfs-progs: move space cache removal to rescue group
The option "--clear-space-cache" is not really that suitable for "btrfs
check" group, as there are some concerns:

- Allowing transid mismatch
- No leaf item checks

  Thoe behaviour are inherited from the default open ctree flags for
  "btrfs check", which can be unsafe if the end user just wants to clear
  the cache.

- Unclear if the cache clearing would happen along with repair

  Thankfully the clearing of space cache is done without any repair

Thus there is a proposal to move space cache removal to rescue group,
and this patch would do that exactly.

However this would lead to some behavior changes:

- Transid mismatch would be treated as error
- Leaf items size/offset would still be checked

  If we hit any above error, we should just abort without doing any
  write.

These change would increase the safety of the space cache removal, thus
I believe it's worthy to introduce such behavior change.

Since we're here, also add a small explanation on why we need this
dedicated tool to clear space cache (especially for v1 cache).

Issue: #698
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-11-03 18:04:37 +01:00
..
common.h
main.c btrfs-progs: move space cache removal to rescue group 2023-11-03 18:04:37 +01:00
mode-common.c btrfs-progs: check: drop unsigned long long casts for printf 2023-11-03 18:04:37 +01:00
mode-common.h
mode-lowmem.c btrfs-progs: check: lowmem, verify the sequence of inline backref items 2023-11-03 18:04:31 +01:00
mode-lowmem.h btrfs-progs: check: update error bit definitions 2023-11-03 18:04:37 +01:00
mode-original.h btrfs-progs: check: update error bit definitions 2023-11-03 18:04:37 +01:00
qgroup-verify.c btrfs-progs: check: drop unsigned long long casts for printf 2023-11-03 18:04:37 +01:00
qgroup-verify.h
repair.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
repair.h