]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: scrub: remove impossible sanity checks
authorQu Wenruo <wqu@suse.com>
Wed, 10 Aug 2022 05:58:57 +0000 (13:58 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:27:55 +0000 (12:27 +0200)
commit9743ebf8471b4350862a60e0fcab0268c317d760
tree75479b9230f71c0637d3edad32c7beb6e6ff3d14
parentb2e68dbab3ab4bc95f5f8d7b4c4cd4e1f1fb10b7
btrfs: scrub: remove impossible sanity checks

There are several sanity checks which are no longer possible to trigger
inside btrfs_scrub_dev().

Since we have mount time check against super block nodesize/sectorsize,
and our fixed macro is hardcoded to handle even the worst combination.

Thus those sanity checks are no longer needed, can be easily removed.

But this patch still uses some ASSERT()s as a safe net just in case we
change some features in the future to trigger those impossible
combinations.

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