Linux compat 4.16: blk_queue_flag_{set,clear}

queue_flag_{set,clear}_unlocked are now private interfaces in
the Linux kernel (https://github.com/torvalds/linux/commit/8a0ac14).
Use blk_queue_flag_{set,clear} interfaces which were introduced as
of https://github.com/torvalds/linux/commit/8814ce8.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #7410
This commit is contained in:
Giuseppe Di Natale
2018-04-10 10:32:14 -07:00
committed by Tony Hutter
parent 7440f10ec1
commit 2f118072cb
4 changed files with 60 additions and 4 deletions
+4 -4
View File
@@ -1666,7 +1666,7 @@ zvol_alloc(dev_t dev, const char *name)
blk_queue_set_read_ahead(zv->zv_queue, 1);
/* Disable write merging in favor of the ZIO pipeline. */
queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, zv->zv_queue);
blk_queue_flag_set(QUEUE_FLAG_NOMERGES, zv->zv_queue);
zv->zv_disk = alloc_disk(ZVOL_MINORS);
if (zv->zv_disk == NULL)
@@ -1817,12 +1817,12 @@ zvol_create_minor_impl(const char *name)
blk_queue_max_discard_sectors(zv->zv_queue,
(zvol_max_discard_blocks * zv->zv_volblocksize) >> 9);
blk_queue_discard_granularity(zv->zv_queue, zv->zv_volblocksize);
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zv->zv_queue);
blk_queue_flag_set(QUEUE_FLAG_DISCARD, zv->zv_queue);
#ifdef QUEUE_FLAG_NONROT
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zv->zv_queue);
blk_queue_flag_set(QUEUE_FLAG_NONROT, zv->zv_queue);
#endif
#ifdef QUEUE_FLAG_ADD_RANDOM
queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, zv->zv_queue);
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, zv->zv_queue);
#endif
if (spa_writeable(dmu_objset_spa(os))) {