Project

General

Profile

Feature #6051

lzc_receive: allow the caller to read the begin record

Added by Andriy Gapon over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-07-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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.

History

#1

Updated by Andriy Gapon over 4 years ago

Oops, a symbol was "eaten" by the markup.
The first line should read:

Currently lzc_receive() requires that its snapname argument is a snapshot name (contains '@').

#3

Updated by Andriy Gapon about 4 years ago

The approach taken in the previous review request has been abandoned in favour of adding a new lzc_receive flavour that would allow the caller to read the begin record and to derive the useful information, e.g. the snapshot name, from it. See https://reviews.csiden.org/r/256/

#4

Updated by Matthew Ahrens about 4 years ago

  • Subject changed from allow lzc_receive to accept a dataset name as 'snapshot' parameter to lzc_receive: allow the caller to read the begin record
#5

Updated by Electric Monk about 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 620f322510b2d6433f7f6af60fa52380c07756ad

commit  620f322510b2d6433f7f6af60fa52380c07756ad
Author: Andriy Gapon <avg@icyb.net.ua>
Date:   2015-11-11T00:40:10.000Z

    6051 lzc_receive: allow the caller to read the begin record
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF