public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] block: scsi: introduce and use BLK_STS_OFFLINE
@ 2022-02-03  6:40 Song Liu
  2022-02-03  6:40 ` [PATCH 1/2] block: introduce BLK_STS_OFFLINE Song Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Song Liu @ 2022-02-03  6:40 UTC (permalink / raw)
  To: linx-block, linux-scsi
  Cc: kernel-team, jejb, martin.petersen, axboe, Song Liu

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 (2):
  block: introduce 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] 12+ messages in thread

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03  6:40 [PATCH 0/2] block: scsi: introduce and use BLK_STS_OFFLINE Song Liu
2022-02-03  6:40 ` [PATCH 1/2] block: introduce BLK_STS_OFFLINE Song Liu
2022-02-03  6:52   ` Song Liu
2022-02-03  7:24     ` Hannes Reinecke
2022-02-03 13:47       ` Jens Axboe
2022-02-03 17:23         ` Song Liu
2022-02-03 18:51           ` Jens Axboe
2022-02-04  7:14           ` Hannes Reinecke
2022-02-03  6:40 ` [PATCH 2/2] scsi: use BLK_STS_OFFLINE for not fully online devices Song Liu
2022-02-03  6:53   ` Song Liu
2022-02-03  7:24     ` Hannes Reinecke
2022-02-03  6:52 ` [PATCH 0/2] block: scsi: introduce and use BLK_STS_OFFLINE Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox