diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 97b65c815e..e35c91bc18 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1582,8 +1582,6 @@ zvol_init(void) blk_register_region(MKDEV(zvol_major, 0), 1UL << MINORBITS, THIS_MODULE, zvol_probe, NULL, NULL); - (void) zvol_create_minors(NULL); - return (0); out2: diff --git a/scripts/zconfig.sh b/scripts/zconfig.sh index 141348c037..281166c59b 100755 --- a/scripts/zconfig.sh +++ b/scripts/zconfig.sh @@ -264,8 +264,9 @@ test_4() { zconfig_zvol_device_stat 0 ${POOL_NAME} ${FULL_ZVOL_NAME} \ ${FULL_SNAP_NAME} ${FULL_CLONE_NAME} || fail 9 - # Load the modules, wait 1 second for udev + # Load the modules, list the pools to ensure they are opened ${ZFS_SH} zfs="spa_config_path=${TMP_CACHE}" || fail 10 + ${ZPOOL} list &>/dev/null # Verify the devices were created zconfig_zvol_device_stat 10 ${POOL_NAME} ${FULL_ZVOL_NAME} \ diff --git a/udev/rules.d/90-zfs.rules.in b/udev/rules.d/90-zfs.rules.in index 52e1d63930..a2715d2e78 100644 --- a/udev/rules.d/90-zfs.rules.in +++ b/udev/rules.d/90-zfs.rules.in @@ -1,4 +1,4 @@ -SUBSYSTEM!="block", GOTO="zfs_end" +SUBSYSTEM!="block|misc", GOTO="zfs_end" ACTION!="add|change", GOTO="zfs_end" ENV{ID_FS_TYPE}=="zfs", RUN+="/sbin/modprobe zfs" @@ -7,4 +7,6 @@ ENV{ID_FS_TYPE}=="zfs_member", RUN+="/sbin/modprobe zfs" KERNEL=="null", SYMLINK+="root" SYMLINK=="null", SYMLINK+="root" +SUBSYSTEM=="misc", KERNEL=="zfs", RUN+="@sbindir@/zpool list" + LABEL="zfs_end"