lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 25 Nov 2013 11:03:15 +0100
From:	Stefan Priebe <s.priebe@...fihost.ag>
To:	linux-fsdevel@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, rwheeler@...hat.com,
	JBottomley@...allels.com, Stefan Priebe <s.priebe@...fihost.ag>
Subject: [PATCH] Commit 39c60a0948cc '[SCSI] sd: fix array cache flushing bug causing performance problems' added a possibility to temporary disable the write cache and skip flushing. But when setting temporary it forgots to revalidate the disk. Change sd_store_cache_type to goto out in case of cache_override.


Signed-off-by: Stefan Priebe <s.priebe@...fihost.ag>
---
 drivers/scsi/sd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 734a29a..ccc6242 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -174,7 +174,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,
 	if (sdkp->cache_override) {
 		sdkp->WCE = wce;
 		sdkp->RCD = rcd;
-		return count;
+		goto out;
 	}
 
 	if (scsi_mode_sense(sdp, 0x08, 8, buffer, sizeof(buffer), SD_TIMEOUT,
@@ -194,6 +194,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,
 			sd_print_sense_hdr(sdkp, &sshdr);
 		return -EINVAL;
 	}
+out:
 	revalidate_disk(sdkp->disk);
 	return count;
 }
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ