svn commit: r282123 - vendor-sys/illumos/dist/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Tue Apr 28 07:14:09 UTC 2015


Author: avg
Date: Tue Apr 28 07:14:08 2015
New Revision: 282123
URL: https://svnweb.freebsd.org/changeset/base/282123

Log:
  5610 zfs clone from different source and target pools produces coredump
  
  Author: Alexander Eremin <a.eremin at nexenta.com>
  Reviewed by: Josef 'Jeff' Sipek <josef.sipek at nexenta.com>
  Reviewed by: Matthew Ahrens <mahrens at delphix.com>
  Approved by: Dan McDonald <danmcd at omniti.com>
  
  illumos/illumos-gate at 03b1c2971d24a9cd2c073d634f7e074fbd14e984

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c	Tue Apr 28 06:34:55 2015	(r282122)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c	Tue Apr 28 07:14:08 2015	(r282123)
@@ -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 2015 Nexenta Systems, Inc. All rights reserved.
  */
 
 /* Portions Copyright 2010 Robert Milkowski */
@@ -904,11 +905,7 @@ dmu_objset_clone_check(void *arg, dmu_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) {
@@ -921,12 +918,6 @@ dmu_objset_clone_check(void *arg, dmu_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);

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c	Tue Apr 28 06:34:55 2015	(r282122)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c	Tue Apr 28 07:14:08 2015	(r282123)
@@ -24,6 +24,7 @@
  * Copyright (c) 2013 Martin Matuska. All rights reserved.
  * Copyright (c) 2014 Joyent, Inc. All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  */
 
 #include <sys/dmu.h>
@@ -421,7 +422,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char 
 	/* Make sure the name is in the specified pool. */
 	spaname = spa_name(dp->dp_spa);
 	if (strcmp(buf, spaname) != 0)
-		return (SET_ERROR(EINVAL));
+		return (SET_ERROR(EXDEV));
 
 	ASSERT(dsl_pool_config_held(dp));
 


More information about the svn-src-all mailing list