diff options
author | Jens Axboe <axboe@fb.com> | 2016-03-30 18:14:14 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-04-13 00:00:39 +0200 |
commit | 519a7e16f9bea99c77fbf549c4b3ef7916199a33 (patch) | |
tree | 5c2142314f6d093ab2f78e40654f3d2c36015944 /drivers/md/dm-table.c | |
parent | bcache: switch to using blk_queue_write_cache() (diff) | |
download | linux-519a7e16f9bea99c77fbf549c4b3ef7916199a33.tar.xz linux-519a7e16f9bea99c77fbf549c4b3ef7916199a33.zip |
dm: switch to using blk_queue_write_cache()
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index f9e8f0bef332..4b1ffc0abe11 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1506,7 +1506,7 @@ static bool dm_table_supports_discards(struct dm_table *t) void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, struct queue_limits *limits) { - unsigned flush = 0; + bool wc = false, fua = false; /* * Copy table's limits to the DM device's request_queue @@ -1519,11 +1519,11 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); if (dm_table_supports_flush(t, REQ_FLUSH)) { - flush |= REQ_FLUSH; + wc = true; if (dm_table_supports_flush(t, REQ_FUA)) - flush |= REQ_FUA; + fua = true; } - blk_queue_flush(q, flush); + blk_queue_write_cache(q, wc, fua); if (!dm_table_discard_zeroes_data(t)) q->limits.discard_zeroes_data = 0; |