Linux 6.5 compat: check BLK_OPEN_EXCL is defined
commit233d34e47ef88ee9e9a1e1ad02384f2063cd039b
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 21 Dec 2023 19:22:56 +0000 (21 11:22 -0800)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 19:22:56 +0000 (21 11:22 -0800)
tree842b7ce5d444641baa7623c3f2284e83410d90fb
parent5a4915660c54e6c16ca7b4683dcf4c18a3942a5b
Linux 6.5 compat: check BLK_OPEN_EXCL is defined

On some systems we already have blkdev_get_by_path() with 4 args
but still the old FMODE_EXCL and not BLK_OPEN_EXCL defined.
The vdev_bdev_mode() function was added to handle this case
but there was no generic way to specify exclusive access.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #15692
module/os/linux/zfs/vdev_disk.c