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
This commit is contained in:
Andriy Gapon 2013-04-03 11:06:26 +00:00
parent 15d4edd3d4
commit 9ff9b984c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249047

View File

@ -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
}