linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Enhance tree block validation checker
@ 2017-09-28  3:36 Qu Wenruo
  2017-09-28  3:36 ` [PATCH 1/5] btrfs: Move leaf and node validation checker to tree-checker.c Qu Wenruo
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Qu Wenruo @ 2017-09-28  3:36 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

The patchset can be fetched from github:
https://github.com/adam900710/linux/tree/checker_enhance

It's based on David's misc-next branch, with following commit as base:
a5e50b4b444c ("btrfs: Add checker for EXTENT_CSUM")

According to David's suggestion, enhance the output format of tree block
validation checker.

And move them into one separate file: tree-checker.c.

Some example output using btrfsck fsck-test images looks like:

For unagliend file extent member:
---
BTRFS critical (device loop0): corrupt leaf root=1 tree_block=29360128 slot=7 ino=257 file_offset=0: invalid file extent disk_bytenr, have 755944791, should be aligned to 4096
BTRFS error (device loop0): open_ctree failed
---

For bad leaf holes:
---
BTRFS critical (device loop0): corrupt leaf root=1 block=29360128 slot=28: uncontinuous item end, have 9387 expect 15018
BTRFS error (device loop0): open_ctree failed
---


Qu Wenruo (5):
  btrfs-progs: Move leaf and node validation checker to tree-checker.c
  btrfs: tree-checker: Enhance btrfs_check_node output
  btrfs: tree-checker: Enhance output for btrfs_check_leaf
  btrfs: tree-checker: Enhance output for check_csum_item
  btrfs: tree-checker: Enhance output for check_extent_data_item

 fs/btrfs/Makefile       |   2 +-
 fs/btrfs/ctree.h        |   4 +
 fs/btrfs/disk-io.c      | 284 +--------------------------------
 fs/btrfs/tree-checker.c | 417 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 425 insertions(+), 282 deletions(-)
 create mode 100644 fs/btrfs/tree-checker.c

-- 
2.14.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-28  8:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28  3:36 [PATCH 0/5] Enhance tree block validation checker Qu Wenruo
2017-09-28  3:36 ` [PATCH 1/5] btrfs: Move leaf and node validation checker to tree-checker.c Qu Wenruo
2017-09-28  3:36 ` [PATCH 2/5] btrfs: tree-checker: Enhance btrfs_check_node output Qu Wenruo
2017-09-28  5:57   ` Nikolay Borisov
2017-09-28  3:36 ` [PATCH 3/5] btrfs: tree-checker: Enhance output for btrfs_check_leaf Qu Wenruo
2017-09-28  6:01   ` Nikolay Borisov
2017-09-28  3:36 ` [PATCH 4/5] btrfs: tree-checker: Enhance output for check_csum_item Qu Wenruo
2017-09-28  3:36 ` [PATCH 5/5] btrfs: tree-checker: Enhance output for check_extent_data_item Qu Wenruo
2017-09-28  6:09   ` Nikolay Borisov
2017-09-28  8:27     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).