summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-03-30 10:06:11 -0600
committerJens Axboe <axboe@fb.com>2016-04-12 16:00:39 -0600
commiteb310e23dbafa5f4010df37f35999622af2cf795 (patch)
tree3aca893c8f82251bed661d4234e47002e236087b
parent2f9a0b33ac6c4a2accaf787456080af35f1cab0b (diff)
downloadlinux-eb310e23dbafa5f4010df37f35999622af2cf795.tar.gz
linux-eb310e23dbafa5f4010df37f35999622af2cf795.tar.bz2
linux-eb310e23dbafa5f4010df37f35999622af2cf795.zip
sd: switch to using blk_queue_write_cache()
Switch to the newer interface, instead of using blk_queue_flush() directly. Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/sd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 69b0a4a7a15f..428c03ef02b2 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -137,15 +137,15 @@ static const char *sd_cache_types[] = {
static void sd_set_flush_flag(struct scsi_disk *sdkp)
{
- unsigned flush = 0;
+ bool wc = false, fua = false;
if (sdkp->WCE) {
- flush |= REQ_FLUSH;
+ wc = true;
if (sdkp->DPOFUA)
- flush |= REQ_FUA;
+ fua = true;
}
- blk_queue_flush(sdkp->disk->queue, flush);
+ blk_queue_write_cache(sdkp->disk->queue, wc, fua);
}
static ssize_t