]> git.baikalelectronics.ru Git - kernel.git/commit
block: introduce BLK_STS_OFFLINE
authorSong Liu <song@kernel.org>
Thu, 3 Feb 2022 19:28:25 +0000 (11:28 -0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 4 Feb 2022 04:10:00 +0000 (21:10 -0700)
commit675fda7a5085b9f8e64e410fd5b0fa11fe174a35
treebf28c532359259735917a29c047f7b00c80c9097
parent47f81e84a37aa09d485829e5c28f74ce0585c53d
block: introduce BLK_STS_OFFLINE

Currently, drivers reports BLK_STS_IOERR for devices that are not full
online or being removed. This behavior could cause confusion for users,
as they are not really I/O errors from the device.

Solve this issue with a new state BLK_STS_OFFLINE, which reports "device
offline error" in dmesg instead of "I/O error".

EIO is intentionally kept to not change user visible return value.

Signed-off-by: Song Liu <song@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220203192827.1370270-2-song@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
include/linux/blk_types.h