]> 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)
commit3bf7af60fcbc95e750edfb1443ddd346fbe7a799
tree75479b9230f71c0637d3edad32c7beb6e6ff3d14
parentc6aef56fce90a2739da174c88d442f1485bfe5d3
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