]> git.proxmox.com Git - mirror_zfs.git/commit
FreeBSD: Fix zvol_*_open() locking
authorRyan Moeller <ryan@iXsystems.com>
Thu, 23 Dec 2021 19:03:23 +0000 (19:03 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 14 Jan 2022 20:43:05 +0000 (12:43 -0800)
commit020545a95d6994822e0b4c902d83320626c1511d
tree4fa4fffd500e3d729cfc5350f48cbb7155db5697
parent69c5e694a18cb6ab66a48292c7f9fa94902f8378
FreeBSD: Fix zvol_*_open() locking

These are the changes for FreeBSD corresponding to the changes made for
Linux in #12863, see that PR for details.

Changes from #12863 are applied for zvol_geom_open and zvol_cdev_open
on FreeBSD.  This also adds a check for the zvol dying which we had
in zvol_geom_open but was missing in zvol_cdev_open.  The check causes
the open to fail early with ENXIO when we are in the middle of changing
volmode.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #12934
module/os/freebsd/zfs/zvol_os.c