Print this page
Placeholder

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzfs/common/libzfs_sendrecv.c
          +++ new/usr/src/lib/libzfs/common/libzfs_sendrecv.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  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   * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  25   25   * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  26   26   * Copyright (c) 2013 Steven Hartland. All rights reserved.
  27   27   * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
       28 + * Copyright 2015 RackTop Systems.
  28   29   */
  29   30  
  30   31  #include <assert.h>
  31   32  #include <ctype.h>
  32   33  #include <errno.h>
  33   34  #include <libintl.h>
  34   35  #include <stdio.h>
  35   36  #include <stdlib.h>
  36   37  #include <strings.h>
  37   38  #include <unistd.h>
↓ open down ↓ 769 lines elided ↑ open up ↑
 807  808   */
 808  809  typedef struct send_dump_data {
 809  810          /* these are all just the short snapname (the part after the @) */
 810  811          const char *fromsnap;
 811  812          const char *tosnap;
 812  813          char prevsnap[ZFS_MAXNAMELEN];
 813  814          uint64_t prevsnap_obj;
 814  815          boolean_t seenfrom, seento, replicate, doall, fromorigin;
 815  816          boolean_t verbose, dryrun, parsable, progress, embed_data, std_out;
 816  817          boolean_t large_block;
      818 +        boolean_t skip_free;
 817  819          int outfd;
 818  820          boolean_t err;
 819  821          nvlist_t *fss;
 820  822          nvlist_t *snapholds;
 821  823          avl_tree_t *fsavl;
 822  824          snapfilter_cb_t *filter_cb;
 823  825          void *filter_cb_arg;
 824  826          nvlist_t *debugnv;
 825  827          char holdtag[ZFS_MAXNAMELEN];
 826  828          int cleanup_fd;
↓ open down ↓ 350 lines elided ↑ open up ↑
1177 1179                                  zfs_close(zhp);
1178 1180                                  return (err);
1179 1181                          }
1180 1182                  }
1181 1183  
1182 1184                  enum lzc_send_flags flags = 0;
1183 1185                  if (sdd->large_block)
1184 1186                          flags |= LZC_SEND_FLAG_LARGE_BLOCK;
1185 1187                  if (sdd->embed_data)
1186 1188                          flags |= LZC_SEND_FLAG_EMBED_DATA;
     1189 +                if (sdd->skip_free)
     1190 +                        flags |= LZC_SEND_FLAG_SKIP_FREE;
1187 1191  
1188 1192                  err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj,
1189 1193                      fromorigin, sdd->outfd, flags, sdd->debugnv);
1190 1194  
1191 1195                  if (sdd->progress) {
1192 1196                          (void) pthread_cancel(tid);
1193 1197                          (void) pthread_join(tid, NULL);
1194 1198                  }
1195 1199          }
1196 1200  
↓ open down ↓ 546 lines elided ↑ open up ↑
1743 1747          sdd.replicate = flags->replicate;
1744 1748          sdd.doall = flags->doall;
1745 1749          sdd.fromorigin = flags->fromorigin;
1746 1750          sdd.fss = fss;
1747 1751          sdd.fsavl = fsavl;
1748 1752          sdd.verbose = flags->verbose;
1749 1753          sdd.parsable = flags->parsable;
1750 1754          sdd.progress = flags->progress;
1751 1755          sdd.dryrun = flags->dryrun;
1752 1756          sdd.large_block = flags->largeblock;
     1757 +        sdd.skip_free = flags->skip_free;
1753 1758          sdd.embed_data = flags->embed_data;
1754 1759          sdd.filter_cb = filter_func;
1755 1760          sdd.filter_cb_arg = cb_arg;
1756 1761          if (debugnvp)
1757 1762                  sdd.debugnv = *debugnvp;
1758 1763          if (sdd.verbose && sdd.dryrun)
1759 1764                  sdd.std_out = B_TRUE;
1760 1765          fout = sdd.std_out ? stdout : stderr;
1761 1766  
1762 1767          /*
↓ open down ↓ 1874 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX