diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2017-04-07 13:55:26 -0700 |
|---|---|---|
| committer | Matthew Ahrens <mahrens@delphix.com> | 2017-04-07 15:19:28 -0700 |
| commit | 471a88e499c660844f4590487ce7c4d5a7090294 (patch) | |
| tree | a8442140fd5ea0b68d33d8c6a6147091e8779c8b | |
| parent | 5697e03e6e3e2697f56ae341c7c8ce79680d6a2e (diff) | |
| download | illumos-joyent-471a88e499c660844f4590487ce7c4d5a7090294.tar.gz | |
5380 receive of a send -p stream doesn't need to try renaming snapshots
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_sendrecv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_sendrecv.c b/usr/src/lib/libzfs/common/libzfs_sendrecv.c index 8d4f2fccd8..2641d53e00 100644 --- a/usr/src/lib/libzfs/common/libzfs_sendrecv.c +++ b/usr/src/lib/libzfs/common/libzfs_sendrecv.c @@ -2770,7 +2770,7 @@ zfs_receive_package(libzfs_handle_t *hdl, int fd, const char *destname, goto out; } - if (fromsnap != NULL) { + if (fromsnap != NULL && recursive) { nvlist_t *renamed = NULL; nvpair_t *pair = NULL; @@ -2797,7 +2797,7 @@ zfs_receive_package(libzfs_handle_t *hdl, int fd, const char *destname, *strchr(tofs, '@') = '\0'; } - if (recursive && !flags->dryrun && !flags->nomount) { + if (!flags->dryrun && !flags->nomount) { VERIFY(0 == nvlist_alloc(&renamed, NV_UNIQUE_NAME, 0)); } @@ -2866,7 +2866,7 @@ zfs_receive_package(libzfs_handle_t *hdl, int fd, const char *destname, anyerr |= error; } while (error == 0); - if (drr->drr_payloadlen != 0 && fromsnap != NULL) { + if (drr->drr_payloadlen != 0 && recursive && fromsnap != NULL) { /* * Now that we have the fs's they sent us, try the * renames again. |
