Skip to content

Commit

Permalink
Fix return value for setting zvol threading (#230)
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Andrew Walker <[email protected]>
  • Loading branch information
anodos325 authored Apr 24, 2024
1 parent 9ec26a2 commit 667c282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,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 (ENOENT);
return (-1);
zv->zv_threading = value;
mutex_exit(&zv->zv_state_lock);
return (0);
Expand Down

0 comments on commit 667c282

Please sign in to comment.