* Patch "scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type" has been added to the 4.9-stable tree
@ 2017-07-03 9:14 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-03 9:14 UTC (permalink / raw)
To: damien.lemoal, alexander.levin, gregkh, hare, martin.petersen
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
scsi-sd-fix-wrong-dpofua-disable-in-sd_read_cache_type.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Mon Jul 3 11:12:14 CEST 2017
From: Damien Le Moal <damien.lemoal@wdc.com>
Date: Thu, 12 Jan 2017 15:25:10 +0900
Subject: scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
From: Damien Le Moal <damien.lemoal@wdc.com>
[ Upstream commit 26f2819772af891dee2843e1f8662c58e5129d5f ]
Zoned block devices force the use of READ/WRITE(16) commands by setting
sdkp->use_16_for_rw and clearing sdkp->use_10_for_rw. This result in
DPOFUA always being disabled for these drives as the assumed use of
the deprecated READ/WRITE(6) commands only looks at sdkp->use_10_for_rw.
Strenghten the test by also checking that sdkp->use_16_for_rw is false.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2572,7 +2572,8 @@ sd_read_cache_type(struct scsi_disk *sdk
if (sdp->broken_fua) {
sd_first_printk(KERN_NOTICE, sdkp, "Disabling FUA\n");
sdkp->DPOFUA = 0;
- } else if (sdkp->DPOFUA && !sdkp->device->use_10_for_rw) {
+ } else if (sdkp->DPOFUA && !sdkp->device->use_10_for_rw &&
+ !sdkp->device->use_16_for_rw) {
sd_first_printk(KERN_NOTICE, sdkp,
"Uses READ/WRITE(6), disabling FUA\n");
sdkp->DPOFUA = 0;
Patches currently in stable-queue which might be from damien.lemoal@wdc.com are
queue-4.9/scsi-sd-fix-wrong-dpofua-disable-in-sd_read_cache_type.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-03 9:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 9:14 Patch "scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type" has been added to the 4.9-stable tree gregkh
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).