zfs/include/os/linux/kernel/linux
Coleman Kane 7c0618bdb7 Linux 6.5 compat: blkdev changes
Multiple changes to the blkdev API were introduced in Linux 6.5. This
includes passing (void* holder) to blkdev_put, adding a new
blk_holder_ops* arg to blkdev_get_by_path, adding a new blk_mode_t type
that replaces uses of fmode_t, and removing an argument from the release
handler on block_device_operations that we weren't using. The open
function definition has also changed to take gendisk* and blk_mode_t, so
update it accordingly, too.

Implement local wrappers for blkdev_get_by_path() and
vdev_blkdev_put() so that the in-line calls are cleaner, and place the
conditionally-compiled implementation details inside of both of these
local wrappers. Both calls are exclusively used within vdev_disk.c, at
this time.

Add blk_mode_is_open_write() to test FMODE_WRITE / BLK_OPEN_WRITE
The wrapper function is now used for testing using the appropriate
method for the kernel, whether the open mode is writable or not.

Emphasize fmode_t arg in zvol_release is not used

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #15099
2023-09-11 16:20:26 -07:00
..
Makefile.am Avoid installing kernel headers on FreeBSD 2020-06-27 17:40:14 -07:00
blkdev_compat.h Linux 6.5 compat: blkdev changes 2023-09-11 16:20:26 -07:00
compiler_compat.h Use fallthrough macro 2021-11-02 09:50:30 -07:00
dcache_compat.h Workaround for Linux PowerPC GPL-only cpu_has_feature() 2023-06-05 10:59:02 -07:00
kmap_compat.h Removing old code for k(un)map_atomic 2021-03-19 22:38:44 -07:00
mod_compat.h Linux: Remove ZFS_AC_KERNEL_SRC_MODULE_PARAM_CALL_CONST autotools check 2022-11-01 12:42:01 -07:00
page_compat.h Linux 5.9 compat: NR_SLAB_RECLAIMABLE 2020-08-29 20:57:45 -07:00
percpu_compat.h Use percpu_counter for obj_alloc counter of Linux-backed caches 2020-06-26 18:06:50 -07:00
simd.h Add AltiVec RAID-Z 2020-01-23 11:01:24 -08:00
simd_aarch64.h Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore 2019-10-24 10:17:33 -07:00
simd_powerpc.h Workaround for Linux PowerPC GPL-only cpu_has_feature() 2023-06-05 10:59:02 -07:00
simd_x86.h Linux 5.19 compat: asm/fpu/internal.h 2022-06-01 14:24:49 -07:00
utsname_compat.h OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
vfs_compat.h Linux 6.3 compat: idmapped mount API changes 2023-06-05 10:59:02 -07:00
xattr_compat.h Linux 6.3 compat: idmapped mount API changes 2023-06-05 10:59:02 -07:00