]> git.proxmox.com Git - mirror_zfs.git/commit
Linux 6.9: Call add_disk() from workqueue to fix zfs_allow_010_pos (#16282)
authorTony Hutter <hutter2@llnl.gov>
Fri, 28 Jun 2024 16:52:03 +0000 (09:52 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Jun 2024 16:52:03 +0000 (09:52 -0700)
commit49f3ce338587410cabc078646b76152685ae102d
treec9cdc6d54b41d50c76d61e5247854b0fe6b3c959
parentc98295eed2687cee704ef5f8f3218d3d44a6a1d8
Linux 6.9: Call add_disk() from workqueue to fix zfs_allow_010_pos (#16282)

The 6.9 kernel behaves differently in how it releases block devices.  In
the common case it will async release the device only after the return
to userspace.  This is different from the 6.8 and older kernels which
release the block devices synchronously.  To get around this, call
add_disk() from a workqueue so that the kernel uses a different
codepath to release our zvols in the way we expect.  This stops
zfs_allow_010_pos from hanging.

Fixes: #16089
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
module/os/linux/zfs/zvol_os.c