]> granicus.if.org Git - zfs/commitdiff
Illumos 5610 - zfs clone from different source and target pools produces coredump
authorAlexander Eremin <a.eremin@nexenta.com>
Fri, 10 Jul 2015 23:45:01 +0000 (01:45 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Jul 2015 17:27:46 +0000 (10:27 -0700)
5610 zfs clone from different source and target pools produces coredump
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

References:
  https://github.com/illumos/illumos-gate/commit/03b1c29
  https://www.illumos.org/issues/5610
  https://www.illumos.org/issues/5824
  https://github.com/zfsonlinux/zfs/issues/2911
  https://github.com/zfsonlinux/zfs/commit/9063f65

Ported-by: kernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3584

module/zfs/dmu_objset.c

index bd953dc3606a0828703d71805977e78d575d7866..56a804dfb69d1ef724483806c2c346c99baf7b7e 100644 (file)
@@ -24,6 +24,7 @@
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2015 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2015, STRATO AG, Inc. All rights reserved.
  */
 
@@ -949,11 +950,7 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx)
                dsl_dir_rele(pdd, FTAG);
                return (SET_ERROR(EEXIST));
        }
-       /* You can't clone across pools. */
-       if (pdd->dd_pool != dp) {
-               dsl_dir_rele(pdd, FTAG);
-               return (SET_ERROR(EXDEV));
-       }
+
        error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL,
            doca->doca_cred);
        if (error != 0) {
@@ -966,12 +963,6 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx)
        if (error != 0)
                return (error);
 
-       /* You can't clone across pools. */
-       if (origin->ds_dir->dd_pool != dp) {
-               dsl_dataset_rele(origin, FTAG);
-               return (SET_ERROR(EXDEV));
-       }
-
        /* You can only clone snapshots, not the head datasets. */
        if (!origin->ds_is_snapshot) {
                dsl_dataset_rele(origin, FTAG);