btrfs: scrub: introduce error reporting functionality for scrub_stripe
authorQu Wenruo <wqu@suse.com>
Mon, 20 Mar 2023 02:12:56 +0000 (10:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:24 +0000 (18:01 +0200)
commit0096580713ffc061a579bd8be0661120079e3beb
tree8a472848d3ef2b7b4a06d7879476679830db33c3
parent058e09e6fe7ccbe5bead222eb7890277391aec0e
btrfs: scrub: introduce error reporting functionality for scrub_stripe

The new helper, scrub_stripe_report_errors(), will report the result of
the scrub to system log.

The main reporting is done by introducing a new helper,
scrub_print_common_warning(), which is mostly the same content from
scrub_print_wanring(), but without the need for a scrub_block.

Since we're reporting the errors, it's the perfect time to update the
scrub stats too.

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