mirror_zfs/include/os/linux
Thomas Bertschinger f9a9aea126 Add mutex_enter_interruptible() for interruptible sleeping IOCTLs
Many long-running ZFS ioctls lock the spa_namespace_lock, forcing
concurrent ioctls to sleep for the mutex. Previously, the only
option is to call mutex_enter() which sleeps uninterruptibly. This
is a usability issue for sysadmins, for example, if the admin runs
`zpool status` while a slow `zpool import` is ongoing, the admin's
shell will be locked in uninterruptible sleep for a long time.

This patch resolves this admin usability issue by introducing
mutex_enter_interruptible() which sleeps interruptibly while waiting
to acquire a lock. It is implemented for both Linux and FreeBSD.

The ZFS_IOC_POOL_CONFIGS ioctl, used by `zpool status`, is changed to
use this new macro so that the command can be interrupted if it is
issued during a concurrent `zpool import` (or other long-running
operation).

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Closes #15360
2023-11-06 16:47:41 -08:00
..
kernel/linux Linux 6.5 compat: blkdev changes 2023-09-19 08:50:01 -07:00
spl Add mutex_enter_interruptible() for interruptible sleeping IOCTLs 2023-11-06 16:47:41 -08:00
zfs/sys ARC: Remove b_bufcnt/b_ebufcnt from ARC headers 2023-10-07 09:08:20 -07:00
Makefile.am Add SHA2 SIMD feature tests for Linux 2023-03-02 13:52:04 -08:00