]> git.proxmox.com Git - mirror_zfs.git/commit
Linux compat 4.16: blk_queue_flag_{set,clear}
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 13 Apr 2018 02:46:14 +0000 (19:46 -0700)
committerTony Hutter <hutter2@llnl.gov>
Tue, 8 May 2018 00:19:57 +0000 (17:19 -0700)
commit4ed30958cee6a7e5e6da41f5767fc7acde1dd1cf
treebcb6d02e4f83235bd9fc2a3cf717dcf4d79e61aa
parent2f118072cbd2146fd8b5d79de5cc6ad537617ac6
Linux compat 4.16: blk_queue_flag_{set,clear}

The HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY case was overlooked in
the original 10f88c5c commit because blk_queue_write_cache()
was available for the in-kernel builds.

Update the blk_queue_flag_{set,clear} wrappers to call the locked
versions to avoid confusion.  This is safe for all existing callers.

The blk_queue_set_write_cache() function has been updated to use
these wrappers.  This means setting/clearing both QUEUE_FLAG_WC
and QUEUE_FLAG_FUA is no longer atomic but this only done early
in zvol_alloc() prior to any requests so there is no issue.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Kash Pande <kash@tripleback.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7428
Closes #7431
include/linux/blkdev_compat.h