bcache: add more accurate error information in read_super_common()
authorColy Li <colyli@suse.de>
Sat, 25 Jul 2020 12:00:24 +0000 (20:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 13:38:20 +0000 (07:38 -0600)
commitc557a5f7bb2558f1386038549c289d7a20c78730
tree03268fe1ee770a5ca23884133de5a6cdb3940a06
parent5b21403c7f48b7d2312b302ab9e8468ec2c711a3
bcache: add more accurate error information in read_super_common()

The improperly set bucket or block size will trigger error in
read_super_common(). For large bucket size, a more accurate error message
for invalid bucket or block size is necessary.

This patch disassembles the combined if() checks into multiple single
if() check, and provide more accurate error message for each check
failure condition.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c