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.
PATCH 1/1 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 <[email protected]>
--- drivers/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/sd.c +2 -1
@@ -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; }
Signature · 1 line
1.7.10.4