mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
3745 zpool create should treat -O mountpoint and -m the same
3811 zpool create -o altroot=/xyz -O mountpoint=/mnt ignores
the mountpoint option
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>
References:
https://www.illumos.org/issues/3745
https://www.illumos.org/issues/3811
illumos/illumos-gate@8b71377531
Ported-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1775
This commit is contained in:
committed by
Brian Behlendorf
parent
d09f25dc66
commit
7bc7f25040
@@ -1159,7 +1159,6 @@ zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot,
|
||||
nvlist_t *zc_fsprops = NULL;
|
||||
nvlist_t *zc_props = NULL;
|
||||
char msg[1024];
|
||||
char *altroot;
|
||||
int ret = -1;
|
||||
|
||||
(void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN,
|
||||
@@ -1260,21 +1259,6 @@ zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If this is an alternate root pool, then we automatically set the
|
||||
* mountpoint of the root dataset to be '/'.
|
||||
*/
|
||||
if (nvlist_lookup_string(props, zpool_prop_to_name(ZPOOL_PROP_ALTROOT),
|
||||
&altroot) == 0) {
|
||||
zfs_handle_t *zhp;
|
||||
|
||||
verify((zhp = zfs_open(hdl, pool, ZFS_TYPE_DATASET)) != NULL);
|
||||
verify(zfs_prop_set(zhp, zfs_prop_to_name(ZFS_PROP_MOUNTPOINT),
|
||||
"/") == 0);
|
||||
|
||||
zfs_close(zhp);
|
||||
}
|
||||
|
||||
create_failed:
|
||||
zcmd_free_nvlists(&zc);
|
||||
nvlist_free(zc_props);
|
||||
|
||||
Reference in New Issue
Block a user