aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2016-05-18 13:45:39 -0700
committerBrian Behlendorf <[email protected]>2016-05-20 11:08:55 -0700
commit68e8f59afb0fa1b388c7dbb8720ac6756d390146 (patch)
tree1248187000ddf265bce694b975f196510c3ff908 /module
parentfd4c7b7a73fda391f94f58530c86ffa5b2ef8e6f (diff)
Linux 4.7 compat: replace blk_queue_flush with blk_queue_write_cache
Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #4665
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zvol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index be6aea879..9c89493ed 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -1291,7 +1291,9 @@ zvol_alloc(dev_t dev, const char *name)
blk_queue_make_request(zv->zv_queue, zvol_request);
-#ifdef HAVE_BLK_QUEUE_FLUSH
+#ifdef HAVE_BLK_QUEUE_WRITE_CACHE
+ blk_queue_write_cache(zv->zv_queue, B_TRUE, B_TRUE);
+#elif defined(HAVE_BLK_QUEUE_FLUSH)
blk_queue_flush(zv->zv_queue, VDEV_REQ_FLUSH | VDEV_REQ_FUA);
#else
blk_queue_ordered(zv->zv_queue, QUEUE_ORDERED_DRAIN, NULL);