]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: (noup) Update zfs to 0.7.5-1ubuntu16.4
authorColin Ian King <colin.king@canonical.com>
Wed, 12 Sep 2018 17:04:00 +0000 (19:04 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 13:25:24 +0000 (15:25 +0200)
BugLink: https://bugs.launchpad.net/bugs/1769937
Sync with zfsutils-linux 0.7.5-1ubuntu16.4 to pick up fixes for
LP#1769937.

Upstream ZFS fix 4ceb8dd6fdfd ("Fix 'zpool create -t <tempname>'")
fixes error message and error exit when using the -t option
when creating a pool.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Marcelo Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
zfs/META
zfs/module/zfs/zfs_ioctl.c

index a906a795ccd50499d861a02e154ee746ab4d0359..9864f8f6443288cac68f3f7fd847174fc4154ad3 100644 (file)
--- a/zfs/META
+++ b/zfs/META
@@ -2,7 +2,7 @@ Meta:         1
 Name:         zfs
 Branch:       1.0
 Version:      0.7.5
-Release:      1ubuntu16.3
+Release:      1ubuntu16.4
 Release-Tags: relext
 License:      CDDL
 Author:       OpenZFS on Linux
index f41e1b9bd2f433fb24f3160931f622b31b1ce63d..c6d180cdae61f0bc12090224dd8bef4a052fe00b 100644 (file)
@@ -1474,6 +1474,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
        nvlist_t *config, *props = NULL;
        nvlist_t *rootprops = NULL;
        nvlist_t *zplprops = NULL;
+       char *spa_name = zc->zc_name;
 
        if ((error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
            zc->zc_iflags, &config)))
@@ -1489,6 +1490,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
        if (props) {
                nvlist_t *nvl = NULL;
                uint64_t version = SPA_VERSION;
+               char *tname;
 
                (void) nvlist_lookup_uint64(props,
                    zpool_prop_to_name(ZPOOL_PROP_VERSION), &version);
@@ -1511,6 +1513,10 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
                    zplprops, NULL);
                if (error != 0)
                        goto pool_props_bad;
+
+               if (nvlist_lookup_string(props,
+                   zpool_prop_to_name(ZPOOL_PROP_TNAME), &tname) == 0)
+                       spa_name = tname;
        }
 
        error = spa_create(zc->zc_name, config, props, zplprops);
@@ -1518,9 +1524,9 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
        /*
         * Set the remaining root properties
         */
-       if (!error && (error = zfs_set_prop_nvlist(zc->zc_name,
+       if (!error && (error = zfs_set_prop_nvlist(spa_name,
            ZPROP_SRC_LOCAL, rootprops, NULL)) != 0)
-               (void) spa_destroy(zc->zc_name);
+               (void) spa_destroy(spa_name);
 
 pool_props_bad:
        nvlist_free(rootprops);