]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r251634: illumos #3745 zpool create should treat -O mountpoint and -m the same
authordelphij <delphij@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 5 Jul 2013 03:50:11 +0000 (03:50 +0000)
committerdelphij <delphij@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 5 Jul 2013 03:50:11 +0000 (03:50 +0000)
commitf75d96dcdc290951f20b315f445e4005cb3723f4
treed5ee46be6eb1afc3d0c286af41e89cadd3818883
parent3ac2e6a3e26e93e40a0ba68ec690e03266cd3da4
MFC r251634: illumos #3745 zpool create should treat -O mountpoint and -m the same

cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:  (change 644608)
This allows specifying a mountpoint using the latter form and having
its value checked and used as it would be using the former form.

As a consequence of this change:

1. The mountpoint property is set in the fsprops nvlist prior
   to creating the pool, rather than being set after creating
   the pool.  To me, this is the proper approach, since it
   avoids creating the pool if the mountpoint setting would
   cause the command to fail.
2. The mountpoint property, unlike all others, can be specified
   more than once.  Only the last setting takes effect.  This
   is to avoid breaking potential existing users that specify
   -m more than once.

Submitted by: will

cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
Fix "zpool create -R <whatever> -m <whatever>".  Ever since
change 644608, this has been broken.  The problem is that some
old code in libzfs_pool.c would force a pool's mountpoint to
"/" when creating a pool with an altroot.  That probably
implemented some old policy decision regarding altroots, but it
conflicts with the current manpage.  It also had no effect
until 644608, because the zpool command would _always_ change
the pool's mountpoint after creating it.  The solution is to
delete the old code from libzfs_pool.c.

Submitted by: asomers

Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c