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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_dir.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_dir.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  24   24   * Copyright (c) 2013 Martin Matuska. All rights reserved.
  25   25   * Copyright (c) 2014 Joyent, Inc. All rights reserved.
  26   26   * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
       27 + * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  27   28   */
  28   29  
  29   30  #include <sys/dmu.h>
  30   31  #include <sys/dmu_objset.h>
  31   32  #include <sys/dmu_tx.h>
  32   33  #include <sys/dsl_dataset.h>
  33   34  #include <sys/dsl_dir.h>
  34   35  #include <sys/dsl_prop.h>
  35   36  #include <sys/dsl_synctask.h>
  36   37  #include <sys/dsl_deleg.h>
↓ open down ↓ 377 lines elided ↑ open up ↑
 414  415          dsl_dir_t *dd;
 415  416          uint64_t ddobj;
 416  417  
 417  418          err = getcomponent(name, buf, &next);
 418  419          if (err != 0)
 419  420                  return (err);
 420  421  
 421  422          /* Make sure the name is in the specified pool. */
 422  423          spaname = spa_name(dp->dp_spa);
 423  424          if (strcmp(buf, spaname) != 0)
 424      -                return (SET_ERROR(EINVAL));
      425 +                return (SET_ERROR(EXDEV));
 425  426  
 426  427          ASSERT(dsl_pool_config_held(dp));
 427  428  
 428  429          err = dsl_dir_hold_obj(dp, dp->dp_root_dir_obj, NULL, tag, &dd);
 429  430          if (err != 0) {
 430  431                  return (err);
 431  432          }
 432  433  
 433  434          while (next != NULL) {
 434  435                  dsl_dir_t *child_dd;
↓ open down ↓ 1551 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX