]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NVMe: switch to using blk_queue_write_cache()
authorJens Axboe <axboe@fb.com>
Tue, 12 Apr 2016 21:43:09 +0000 (15:43 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:15 +0000 (13:41 -0700)
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 7c88cb00f2a26637bade6c62a17d17f31a954e30)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/core.c

index 58befbec02df8d4eedf8a082fcdcf58e5341f9eb..480062e02bde22890f1145f27a8e7c7287dcab51 100644 (file)
@@ -947,6 +947,8 @@ EXPORT_SYMBOL_GPL(nvme_shutdown_ctrl);
 static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
                struct request_queue *q)
 {
+       bool vwc = false;
+
        if (ctrl->max_hw_sectors) {
                u32 max_segments =
                        (ctrl->max_hw_sectors / (ctrl->page_size >> 9)) + 1;
@@ -957,7 +959,8 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
        if (ctrl->stripe_size)
                blk_queue_chunk_sectors(q, ctrl->stripe_size >> 9);
        if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
-               blk_queue_flush(q, REQ_FLUSH | REQ_FUA);
+               vwc = true;
+       blk_queue_write_cache(q, vwc, vwc);
 }
 
 /*