提交 eb310e23 编写于 作者: J Jens Axboe

sd: switch to using blk_queue_write_cache()

Switch to the newer interface, instead of using blk_queue_flush()
directly.
Signed-off-by: NJens Axboe <axboe@fb.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 2f9a0b33
...@@ -137,15 +137,15 @@ static const char *sd_cache_types[] = { ...@@ -137,15 +137,15 @@ static const char *sd_cache_types[] = {
static void sd_set_flush_flag(struct scsi_disk *sdkp) static void sd_set_flush_flag(struct scsi_disk *sdkp)
{ {
unsigned flush = 0; bool wc = false, fua = false;
if (sdkp->WCE) { if (sdkp->WCE) {
flush |= REQ_FLUSH; wc = true;
if (sdkp->DPOFUA) 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 static ssize_t
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册