dm: Refactor is_abnormal_io()
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 4 Jul 2024 05:28:13 +0000 (14:28 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jul 2024 06:42:04 +0000 (00:42 -0600)
commitae7e965b36e3132238d16b4ccd223f65162397b5
treea4f0c627687aba55e6fc196673418078a5d11c08
parentf4d5dc33c823ef1d7ccbbd2d1e40b871fad0012b
dm: Refactor is_abnormal_io()

Use a single switch-case to simplify is_abnormal_io() and make this
function more readable and easier to modify.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240704052816.623865-3-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm.c