* [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.
@ 2013-11-25 10:03 Stefan Priebe
0 siblings, 0 replies; only message in thread
From: Stefan Priebe @ 2013-11-25 10:03 UTC (permalink / raw)
To: linux-fsdevel; +Cc: linux-kernel, rwheeler, JBottomley, Stefan Priebe
Signed-off-by: Stefan Priebe <s.priebe@profihost.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-25 10:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25 10:03 [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 Stefan Priebe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®