Skip to content
Browse files

spa_open_common: fix argument to zvol_create_minors

Prior to r248571 spa_open was always called with a bare pool name,
but now it is called with a dataset name instead (spa_lookup handles
that).
So, when a ZFS root is mounted spa_open is called with a name of a root
dataset, which can very well be different from the pool name.
But zvol_create_minors should be called with the pool name, because it
performs a recursive traversal of all datasets under the name to find
all those that are volumes.

MFC after:	7 days
  • Loading branch information...
1 parent e9e9630 commit c8fe315d98b07175c5fb3029236d99caf89a5eff @avg-I avg-I committed Apr 3, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
View
2 sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
@@ -2885,7 +2885,7 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
#ifdef __FreeBSD__
#ifdef _KERNEL
if (firstopen)
- zvol_create_minors(pool);
+ zvol_create_minors(spa->spa_name);
#endif
#endif
}

0 comments on commit c8fe315

Please sign in to comment.
Something went wrong with that request. Please try again.