Print this page
5610 zfs clone from different source and target pools produces coredump

@@ -22,10 +22,11 @@
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  * 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>
 #include <sys/dmu_objset.h>
 #include <sys/dmu_tx.h>

@@ -419,11 +420,11 @@
                 return (err);
 
         /* 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));
 
         err = dsl_dir_hold_obj(dp, dp->dp_root_dir_obj, NULL, tag, &dd);
         if (err != 0) {