Skip to content

Commit 856d8e3

Browse files
Stefan Haberlandaxboe
authored andcommitted
s390/dasd: print copy pair message only for the correct error
The DASD driver has certain types of requests that might be rejected by the storage server or z/VM because they are not supported. Since the missing support of the command is not a real issue there is no user visible kernel error message for this. For copy pair setups there is a specific error that IO is not allowed on secondary devices. This error case is explicitly handled and an error message is printed. The code checking for the error did use a bitwise 'and' that is used to check for specific bits. But in this case the whole sense byte has to match. This leads to the problem that the copy pair related error message is erroneously printed for other error cases that are usually not reported. This might heavily confuse users and lead to follow on actions that might disrupt application processing. Fix by checking the sense byte for the exact value and not single bits. Cc: stable@vger.kernel.org # 6.1+ Fixes: 1fca631 ("s390/dasd: suppress generic error messages for PPRC secondary devices") Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com> Link: https://lore.kernel.org/r/20230721193647.3889634-5-sth@linux.ibm.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 8a2278c commit 856d8e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/s390/block/dasd_3990_erp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
10501050
dev_err(&device->cdev->dev, "An I/O request was rejected"
10511051
" because writing is inhibited\n");
10521052
erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
1053-
} else if (sense[7] & SNS7_INVALID_ON_SEC) {
1053+
} else if (sense[7] == SNS7_INVALID_ON_SEC) {
10541054
dev_err(&device->cdev->dev, "An I/O request was rejected on a copy pair secondary device\n");
10551055
/* suppress dump of sense data for this error */
10561056
set_bit(DASD_CQR_SUPPRESS_CR, &erp->refers->flags);

0 commit comments

Comments
 (0)