aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index ffa0689ee840..20514c47a5aa 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2109,7 +2109,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
2109 struct scsi_disk *sdkp = scsi_disk(disk); 2109 struct scsi_disk *sdkp = scsi_disk(disk);
2110 struct scsi_device *sdp = sdkp->device; 2110 struct scsi_device *sdp = sdkp->device;
2111 unsigned char *buffer; 2111 unsigned char *buffer;
2112 unsigned ordered; 2112 unsigned flush = 0;
2113 2113
2114 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, 2114 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp,
2115 "sd_revalidate_disk\n")); 2115 "sd_revalidate_disk\n"));
@@ -2151,17 +2151,15 @@ static int sd_revalidate_disk(struct gendisk *disk)
2151 2151
2152 /* 2152 /*
2153 * We now have all cache related info, determine how we deal 2153 * We now have all cache related info, determine how we deal
2154 * with ordered requests. Note that as the current SCSI 2154 * with flush requests.
2155 * dispatch function can alter request order, we cannot use
2156 * QUEUE_ORDERED_TAG_* even when ordered tag is supported.
2157 */ 2155 */
2158 if (sdkp->WCE) 2156 if (sdkp->WCE) {
2159 ordered = sdkp->DPOFUA 2157 flush |= REQ_FLUSH;
2160 ? QUEUE_ORDERED_DRAIN_FUA : QUEUE_ORDERED_DRAIN_FLUSH; 2158 if (sdkp->DPOFUA)
2161 else 2159 flush |= REQ_FUA;
2162 ordered = QUEUE_ORDERED_DRAIN; 2160 }
2163 2161
2164 blk_queue_ordered(sdkp->disk->queue, ordered); 2162 blk_queue_flush(sdkp->disk->queue, flush);
2165 2163
2166 set_capacity(disk, sdkp->capacity); 2164 set_capacity(disk, sdkp->capacity);
2167 kfree(buffer); 2165 kfree(buffer);