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/zfs_ioctl.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_ioctl.c
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Portions Copyright 2011 Martin Matuska
  25   25   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  26   26   * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  27   27   * Copyright (c) 2013 by Delphix. All rights reserved.
  28   28   * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
       29 + * Copyright (c) 2013 Steven Hartland. All rights reserved.
  29   30   */
  30   31  
  31   32  /*
  32   33   * ZFS ioctls.
  33   34   *
  34   35   * This file handles the ioctls to /dev/zfs, used for configuring ZFS storage
  35   36   * pools and filesystems, e.g. with /sbin/zfs and /sbin/zpool.
  36   37   *
  37   38   * There are two ways that we handle ioctls: the legacy way where almost
  38   39   * all of the logic is in the ioctl callback, and the new way where most
↓ open down ↓ 4934 lines elided ↑ open up ↑
4973 4974   *
4974 4975   * outnvl: {
4975 4976   *     snapname -> error value (int32)
4976 4977   *     ...
4977 4978   * }
4978 4979   */
4979 4980  /* ARGSUSED */
4980 4981  static int
4981 4982  zfs_ioc_release(const char *pool, nvlist_t *holds, nvlist_t *errlist)
4982 4983  {
4983      -        nvpair_t *pair;
4984      -
4985      -        /*
4986      -         * The release may cause the snapshot to be destroyed; make sure it
4987      -         * is not mounted.
4988      -         */
4989      -        for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL;
4990      -            pair = nvlist_next_nvpair(holds, pair))
4991      -                zfs_unmount_snap(nvpair_name(pair));
4992      -
4993 4984          return (dsl_dataset_user_release(holds, errlist));
4994 4985  }
4995 4986  
4996 4987  /*
4997 4988   * inputs:
4998 4989   * zc_name              name of new filesystem or snapshot
4999 4990   * zc_value             full name of old snapshot
5000 4991   *
5001 4992   * outputs:
5002 4993   * zc_cookie            space in bytes
↓ open down ↓ 916 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX