public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <song@kernel.org>
To: <linx-block@vger.kernel.org>, <linux-scsi@vger.kernel.org>
Cc: <kernel-team@fb.com>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>, <axboe@kernel.dk>,
	Song Liu <song@kernel.org>
Subject: [PATCH 0/2] block: scsi: introduce and use BLK_STS_OFFLINE
Date: Wed, 2 Feb 2022 22:40:07 -0800	[thread overview]
Message-ID: <20220203064009.1795344-1-song@kernel.org> (raw)

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

             reply	other threads:[~2022-02-03  6:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  6:40 Song Liu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203064009.1795344-1-song@kernel.org \
    --to=song@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-team@fb.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linx-block@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox