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:
LOLi
2017-07-31 20:07:05 +02:00
committed by Tony Hutter
parent 0c8fedeb35
commit 20c88dc3ef
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -3425,7 +3425,7 @@ function swap_setup
typeset swapdev=$1
if is_linux; then
log_must mkswap $swapdev > /dev/null 2>&1
log_must eval "mkswap $swapdev > /dev/null 2>&1"
log_must swapon $swapdev
else
log_must swap -a $swapdev