linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] block: scsi: introduce and use BLK_STS_OFFLINE
@ 2022-02-03 19:28 Song Liu
  2022-02-03 19:28 ` [PATCH v2 1/3] block: introduce BLK_STS_OFFLINE Song Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Song Liu @ 2022-02-03 19:28 UTC (permalink / raw)
  To: linux-block, linux-scsi
  Cc: kernel-team, jejb, martin.petersen, axboe, hare, Song Liu

Changes v1 => v2:
1. Add patch 2/3 to change user visible return value to -ENODEV. (Hannes)
2. In the commit log, explain the reason to keep EIO in 1/3.

We have a use case where HDDs are regularly power on/off to perserve power.
When a drive is being removed, we often see errors like

   [  172.803279] I/O error, dev sda, sector 3137184

These messages are confusing for automations that grep dmesg, as they look
very similar to real HDD error.

Solve this issue with a new block state BLK_STS_OFFLINE. After the change,
the error message looks like

   [  172.803279] device offline error, dev sda, sector 3137184

so that the automations won't confuse them with real I/O error.

Song Liu (3):
  block: introduce BLK_STS_OFFLINE
  block: return -ENODEV for BLK_STS_OFFLINE
  scsi: use BLK_STS_OFFLINE for not fully online devices

 block/blk-core.c          | 1 +
 drivers/scsi/scsi_lib.c   | 2 +-
 include/linux/blk_types.h | 7 +++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

--
2.30.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-04  7:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 19:28 [PATCH v2 0/3] block: scsi: introduce and use BLK_STS_OFFLINE Song Liu
2022-02-03 19:28 ` [PATCH v2 1/3] block: introduce BLK_STS_OFFLINE Song Liu
2022-02-04  7:25   ` Hannes Reinecke
2022-02-03 19:28 ` [PATCH v2 2/3] block: return -ENODEV for BLK_STS_OFFLINE Song Liu
2022-02-04  7:26   ` Hannes Reinecke
2022-02-03 19:28 ` [PATCH v2 3/3] scsi: use BLK_STS_OFFLINE for not fully online devices Song Liu
2022-02-04  3:16 ` [PATCH v2 0/3] block: scsi: introduce and use BLK_STS_OFFLINE Martin K. Petersen
2022-02-04  4:10 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).