Skip to content

Commit 1cddb8c

Browse files
alhazredbehlendorf
authored andcommitted
Illumos 5610 - zfs clone from different source and target pools produces coredump
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: illumos/illumos-gate@03b1c29 https://www.illumos.org/issues/5610 https://www.illumos.org/issues/5824 #2911 9063f65 Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3584
1 parent eaa52d3 commit 1cddb8c

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

module/zfs/dmu_objset.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
2525
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
2626
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
27+
* Copyright (c) 2015 Nexenta Systems, Inc. All rights reserved.
2728
* Copyright (c) 2015, STRATO AG, Inc. All rights reserved.
2829
*/
2930

@@ -949,11 +950,7 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx)
949950
dsl_dir_rele(pdd, FTAG);
950951
return (SET_ERROR(EEXIST));
951952
}
952-
/* You can't clone across pools. */
953-
if (pdd->dd_pool != dp) {
954-
dsl_dir_rele(pdd, FTAG);
955-
return (SET_ERROR(EXDEV));
956-
}
953+
957954
error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL,
958955
doca->doca_cred);
959956
if (error != 0) {
@@ -966,12 +963,6 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx)
966963
if (error != 0)
967964
return (error);
968965

969-
/* You can't clone across pools. */
970-
if (origin->ds_dir->dd_pool != dp) {
971-
dsl_dataset_rele(origin, FTAG);
972-
return (SET_ERROR(EXDEV));
973-
}
974-
975966
/* You can only clone snapshots, not the head datasets. */
976967
if (!origin->ds_is_snapshot) {
977968
dsl_dataset_rele(origin, FTAG);

0 commit comments

Comments
 (0)