From: Stefan Haberland <sth@linux.ibm.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
Jan Hoeppner <hoeppner@linux.ibm.com>,
linux-s390@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>
Subject: [PATCH 6/7] s390/dasd: suppress generic error messages for PPRC secondary devices
Date: Tue, 20 Sep 2022 21:26:15 +0200 [thread overview]
Message-ID: <20220920192616.808070-7-sth@linux.ibm.com> (raw)
In-Reply-To: <20220920192616.808070-1-sth@linux.ibm.com>
Suppress generic command reject messages and dump of sense data for
Peer-To-Peer-Remote-Copy (PPRC) secondary errors.
If IO is issued on a PPRC secondary device, a specific
error message is printed instead.
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
---
arch/s390/include/asm/scsw.h | 5 +++++
drivers/s390/block/dasd_3990_erp.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/arch/s390/include/asm/scsw.h b/arch/s390/include/asm/scsw.h
index 7ce584aff5bb..322bdcd4b616 100644
--- a/arch/s390/include/asm/scsw.h
+++ b/arch/s390/include/asm/scsw.h
@@ -215,6 +215,11 @@ union scsw {
#define SNS2_ENV_DATA_PRESENT 0x10
#define SNS2_INPRECISE_END 0x04
+/*
+ * architectured values for PPRC errors
+ */
+#define SNS7_INVALID_ON_SEC 0x0e
+
/**
* scsw_is_tm - check for transport mode scsw
* @scsw: pointer to scsw
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c
index 299001ad9a32..81d283b3cd3b 100644
--- a/drivers/s390/block/dasd_3990_erp.c
+++ b/drivers/s390/block/dasd_3990_erp.c
@@ -1050,6 +1050,11 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
dev_err(&device->cdev->dev, "An I/O request was rejected"
" because writing is inhibited\n");
erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
+ } else if (sense[7] & SNS7_INVALID_ON_SEC) {
+ dev_err(&device->cdev->dev, "An I/O request was rejected on a copy pair secondary device\n");
+ /* suppress dump of sense data for this error */
+ set_bit(DASD_CQR_SUPPRESS_CR, &erp->refers->flags);
+ erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
} else {
/* fatal error - set status to FAILED
internal error 09 - Command Reject */
--
2.34.1
next prev parent reply other threads:[~2022-09-20 19:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 19:26 [PATCH 0/7] s390/dasd: add hardware copy relation Stefan Haberland
2022-09-20 19:26 ` [PATCH 1/7] s390/dasd: put block allocation in separate function Stefan Haberland
2022-09-20 19:26 ` [PATCH 2/7] s390/dasd: add query PPRC function Stefan Haberland
2022-09-20 19:26 ` [PATCH 3/7] s390/dasd: add copy pair setup Stefan Haberland
2022-09-20 19:26 ` [PATCH 4/7] s390/dasd: add copy pair swap capability Stefan Haberland
2022-09-20 19:26 ` [PATCH 5/7] s390/dasd: add ioctl to perform a swap of the drivers copy pair Stefan Haberland
2022-09-20 19:26 ` Stefan Haberland [this message]
2022-09-20 19:26 ` [PATCH 7/7] s390/dasd: add device ping attribute Stefan Haberland
2022-09-21 7:07 ` [PATCH 0/7] s390/dasd: add hardware copy relation Johannes Thumshirn
2022-09-21 8:23 ` Stefan Haberland
2022-09-21 11:11 ` Johannes Thumshirn
2022-09-21 14:36 ` Jens Axboe
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=20220920192616.808070-7-sth@linux.ibm.com \
--to=sth@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=borntraeger@de.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hoeppner@linux.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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