Skip to content

btrfs: chunk and dev-extent related error handler enhancement

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: Introduce mount time chunk <-> dev extent mapping checkfs/btrfs/disk-io.c fs/btrfs/volumes.c fs/btrfs/volumes.h+182 -02 replies
2/2btrfs: Exit gracefully when failed to add chunk mapfs/btrfs/volumes.c+6 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: chunk and dev-extent related error handler enhancement

Can be fetched with all existing tree-checker/bg<->chunk error detector from github:
https://github.com/adam900710/linux/tree/tree_checker_enhance

Still some fuzzed images reported from Xu Wen.
This time, 2 can be fixed by chunk <-> dev extent mapping verification. One BUG_ON() can be removed.

The remaining 2 images are all mostly about extent tree corruption, which is not as easy to detect, since extent tree has way more complex reference relationship.

At least, fix what we can first.

And for chunk <-> dev extent mapping verification, it will trigger read on the whole device tree, to iterate through all DEV_EXTENT items. This will introduce an extra overhead on mount.

However since device tree is pretty small (the same level as chunk tree), and according to previous analyse on mount time, chunk tree iteration is only a pretty small fraction of the whole mount time (less than 5%), it shouldn't bring obvious impact to users.

Qu Wenruo (2):
btrfs: Introduce mount time chunk <-> dev extent mapping check
btrfs: Exit gracefully when failed to add chunk map

 fs/btrfs/disk-io.c |   7 ++
 fs/btrfs/volumes.c | 181 ++++++++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/volumes.h |   2 +
 3 files changed, 188 insertions(+), 2 deletions(-)
Signature · 1 line
2.18.0