]> 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)
commit1765d801f123c7c384bdb79c21a4c2d1c5635db7
tree03268fe1ee770a5ca23884133de5a6cdb3940a06
parent2a801472a804540a48a6e795733ac53dac24b55a
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