HomeFreeBSD

Linux compat 4.16: blk_queue_flag_{set,clear}

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Apr 13 2018, 2:46 AM
GitHub <noreply@github.com>Committed on Apr 13 2018, 2:46 AM
Parents
rG7fab63618827: Add 'zpool split' coverage to the ZFS Test Suite
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGd6bb22171b6e: Linux compat 4.16: blk_queue_flag_{set,clear} (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Apr 13 2018, 2:46 AM