]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: scrub: introduce a helper to verify one scrub_stripe
authorQu Wenruo <wqu@suse.com>
Mon, 20 Mar 2023 02:12:53 +0000 (10:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:23 +0000 (18:01 +0200)
commit97cf8f37542ab5764ab397257e8844fb09f91d1c
treeae3cd3cecbf32a3ce78848bdded1d85742b5bd63
parenta3ddbaebc7c9bcdaf0e9bf39780bbad4ff1b569f
btrfs: scrub: introduce a helper to verify one scrub_stripe

The new helper, scrub_verify_stripe(), shares the same main workflow of
the old scrub code.

The major differences are:

- How pages/page_offset is grabbed
  Everything can be grabbed from scrub_stripe easily.

- When error report happens
  Currently the helper only verifies the sectors, not really doing any
  error reporting.
  The error reporting would be done after we have done the repair.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c
fs/btrfs/scrub.h