mirror_zfs/include/os/linux/spl/sys
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
..
ia32 x86 asm: Replace .align with .balign 2023-01-24 09:04:39 -08:00
acl.h
atomic.h
byteorder.h Reduce false positives from Static Analyzers 2022-09-30 15:30:12 -07:00
callb.h
callo.h
cmn_err.h spl: cmn_err_once() should be usable in brace-less if else statements 2023-03-15 11:13:25 -07:00
condvar.h
cred.h Linux 6.3 compat: idmapped mount API changes 2023-04-10 14:15:36 -07:00
ctype.h
debug.h debug: fix output from VERIFY0 assertion 2022-10-28 11:46:44 -07:00
disp.h Cleanup: Use OpenSolaris functions to call scheduler 2022-09-12 09:55:37 -07:00
dkio.h
errno.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
fcntl.h
file.h
inttypes.h
isa_defs.h Add loongarch64 support 2023-04-25 16:05:45 -07:00
kmem_cache.h linux/spl/kmem_cache: undefine kmem_cache_alloc before defining it 2023-08-25 13:33:40 -07:00
kmem.h Use __attribute__((malloc)) on memory allocation functions 2023-05-26 15:47:52 -07:00
kstat.h Cleanup: Switch to strlcpy from strncpy 2022-09-27 16:35:29 -07:00
list.h
misc.h zed: mark disks as REMOVED when they are removed 2022-09-28 09:48:46 -07:00
mod_os.h
mutex.h Add mutex_enter_interruptible() for interruptible sleeping IOCTLs 2023-11-06 16:47:41 -08:00
param.h
proc.h
processor.h
procfs_list.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
random.h
rwlock.h
shrinker.h Linux 6.0 compat: register_shrinker() now var-arg 2022-08-08 16:18:30 -07:00
sid.h
signal.h
simd.h
stat.h
string.h
sunddi.h
sysmacros.h zfs_rename: support RENAME_* flags 2022-10-28 09:49:20 -07:00
systeminfo.h
taskq.h Add a delay to tearing down threads. 2023-06-26 13:57:12 -07:00
thread.h
time.h
timer.h
trace_spl.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
trace_taskq.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
trace.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
tsd.h
types32.h
types.h Linux 6.5 compat: intptr_t definition is canonically signed 2023-07-21 16:35:12 -07:00
uio.h zvol: Remove broken blk-mq optimization 2023-11-06 16:47:24 -08:00
user.h
vfs.h
vmem.h Use __attribute__((malloc)) on memory allocation functions 2023-05-26 15:47:52 -07:00
vmsystm.h Add membar_sync 2022-09-20 15:32:44 -07:00
vnode.h
wait.h
wmsum.h
zmod.h
zone.h