Print this page
Matt's code review fixes

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 ↓ 2707 lines elided ↑ open up ↑
2708 2708           * Get the fs specified by the first path in the stream (the top level
2709 2709           * specified by 'zfs send') and pass it to each invocation of
2710 2710           * zfs_receive_one().
2711 2711           */
2712 2712          (void) strlcpy(sendfs, drr->drr_u.drr_begin.drr_toname,
2713 2713              ZFS_MAXNAMELEN);
2714 2714          if ((cp = strchr(sendfs, '@')) != NULL) {
2715 2715                  *cp = '\0';
2716 2716                  /*
2717 2717                   * Find the "sendsnap", the final snapshot in a replication
2718      -                 * stream, so zfs_receive_one() can set filesystem properties
2719      -                 * ONLY when receiving that final snapshot.
     2718 +                 * stream.  zfs_receive_one() handles certain errors
     2719 +                 * differently, depending on if the contained stream is the
     2720 +                 * last one or not.
2720 2721                   */
2721 2722                  sendsnap = (cp + 1);
2722 2723          }
2723 2724  
2724 2725          /* Finally, receive each contained stream */
2725 2726          do {
2726 2727                  /*
2727 2728                   * we should figure out if it has a recoverable
2728 2729                   * error, in which case do a recv_skip() and drive on.
2729 2730                   * Note, if we fail due to already having this guid,
↓ open down ↓ 908 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX