]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - lib/libz/inffast.c
MFV r308222: 6051 lzc_receive: allow the caller to read the begin record
authorAndriy Gapon <avg@FreeBSD.org>
Thu, 3 Nov 2016 09:24:27 +0000 (09:24 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Thu, 3 Nov 2016 09:24:27 +0000 (09:24 +0000)
commitd5315b02cd10ad8861a00b3224add94e23b39a84
tree8032c2446b49e0bd374006563a6237e6a680bd69
parent19a8946bce1e8cb309aa152462fcb30bf49e457e
parentc01a79842c34ad06b62b2f069ed8a9d2e8a901b2
MFV r308222: 6051 lzc_receive: allow the caller to read the begin record

illumos/illumos-gate@620f322510b2d6433f7f6af60fa52380c07756ad
https://github.com/illumos/illumos-gate/commit/620f322510b2d6433f7f6af60fa52380c07756ad

https://www.illumos.org/issues/6051
  Currently lzc_receive() requires that its snapname argument is a snapshot name
  (contains '@').
  zfs receive allows to specify just a dataset name and would try to deduce the
  snapshot name from the stream.
  I propose to allow lzc_receive() to do the same.
  That seems to be quite easy to implement, it requires only a small amount of
  logic, it does not require any additional system calls or any additional data
  from the stream.
  The benefit is that the new behavior would allow to keep the snapshot names the
  same between the sender and receiver at zero cost, without a need to pass the
  names out of band.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@icyb.net.ua>
MFC after: 2 weeks
cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h