]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd66be5faa98c635ca398ef1a256abe222ea2ac08
tree03268fe1ee770a5ca23884133de5a6cdb3940a06
parent827c9f299f7841631136512d11074eb9053b94ae
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