From 799bda73e292f640d76a074c9417e82671b23389 Mon Sep 17 00:00:00 2001 From: Andrew Walker Date: Mon, 20 Oct 2025 17:21:40 -0500 Subject: [PATCH] Fix return value for setting zvol threading We must return -1 instead of ENOENT if the special zvol threading property set function can't locate the dataset (this would typically happen with an encypted and unmounted zvol) so that the operation gets inserted properly into the nvlist for operations to set. This is because we want the property to be set once the zvol is decrypted again. Reviewed-by: Allan Jude Reviewed-by: Rob Norris Reviewed-by: Ameer Hamza Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Andrew Walker Closes #17836 --- module/zfs/zvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index faced0db7..00f98168d 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -410,7 +410,7 @@ zvol_set_volthreading(const char *name, boolean_t value) { zvol_state_t *zv = zvol_find_by_name(name, RW_NONE); if (zv == NULL) - return (SET_ERROR(ENOENT)); + return (-1); zv->zv_threading = value; mutex_exit(&zv->zv_state_lock); return (0);