mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix volmode=none property behavior at import time
At import time spa_import() calls zvol_create_minors() directly: with the current implementation we have no way to avoid device node creation when volmode=none. Fix this by enforcing volmode=none directly in zvol_alloc(). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #6426
This commit is contained in:
@@ -1603,6 +1603,9 @@ zvol_alloc(dev_t dev, const char *name)
|
||||
if (volmode == ZFS_VOLMODE_DEFAULT)
|
||||
volmode = zvol_volmode;
|
||||
|
||||
if (volmode == ZFS_VOLMODE_NONE)
|
||||
return (NULL);
|
||||
|
||||
zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP);
|
||||
|
||||
list_link_init(&zv->zv_next);
|
||||
|
||||
Reference in New Issue
Block a user