Print this page
3740 Poor ZFS send / receive performance due to snapshot hold / release processing
Submitted by: Steven Hartland <steven.hartland@multiplay.co.uk>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dsl_destroy.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_destroy.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  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) 2013 by Delphix. All rights reserved.
       24 + * Copyright (c) 2013 Steven Hartland. All rights reserved.
  24   25   */
  25   26  
  26   27  #include <sys/zfs_context.h>
  27   28  #include <sys/dsl_userhold.h>
  28   29  #include <sys/dsl_dataset.h>
  29   30  #include <sys/dsl_synctask.h>
  30   31  #include <sys/dmu_tx.h>
  31   32  #include <sys/dsl_pool.h>
  32   33  #include <sys/dsl_dir.h>
  33   34  #include <sys/dmu_traverse.h>
↓ open down ↓ 86 lines elided ↑ open up ↑
 120  121                              nvpair_name(pair));
 121  122                  } else {
 122  123                          fnvlist_add_int32(dsda->dsda_errlist,
 123  124                              nvpair_name(pair), error);
 124  125                  }
 125  126          }
 126  127  
 127  128          pair = nvlist_next_nvpair(dsda->dsda_errlist, NULL);
 128  129          if (pair != NULL)
 129  130                  return (fnvpair_value_int32(pair));
      131 +
      132 +        if (nvlist_empty(dsda->dsda_successful_snaps))
      133 +                return (SET_ERROR(ENOENT));
      134 +
 130  135          return (0);
 131  136  }
 132  137  
 133  138  struct process_old_arg {
 134  139          dsl_dataset_t *ds;
 135  140          dsl_dataset_t *ds_prev;
 136  141          boolean_t after_branch_point;
 137  142          zio_t *pio;
 138  143          uint64_t used, comp, uncomp;
 139  144  };
↓ open down ↓ 791 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX