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/cmd/ndmpd/ndmp/ndmpd_chkpnt.c
          +++ new/usr/src/cmd/ndmpd/ndmp/ndmpd_chkpnt.c
↓ open down ↓ 195 lines elided ↑ open up ↑
 196  196          }
 197  197  
 198  198          if (cleanup_fd == -1 && (cleanup_fd = open(ZFS_DEV,
 199  199              O_RDWR|O_EXCL)) < 0) {
 200  200                  NDMP_LOG(LOG_ERR, "Cannot open dev %d", errno);
 201  201                  zfs_close(zhp);
 202  202                  return (-1);
 203  203          }
 204  204  
 205  205          p = strchr(snapname, '@') + 1;
 206      -        if (zfs_hold(zhp, p, jname, recursive, B_FALSE, cleanup_fd) != 0) {
      206 +        if (zfs_hold(zhp, p, jname, recursive, cleanup_fd) != 0) {
 207  207                  NDMP_LOG(LOG_ERR, "Cannot hold snapshot %s", p);
 208  208                  zfs_close(zhp);
 209  209                  return (-1);
 210  210          }
 211  211          zfs_close(zhp);
 212  212          return (0);
 213  213  }
 214  214  
 215  215  int
 216  216  snapshot_release(char *volname, char *snapname, char *jname,
↓ open down ↓ 133 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX