Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lzc_receive_with_header: allow caller to access information in begin header #14

Open
wants to merge 2 commits into
base: libzfs_core-wip
Choose a base branch
from

Conversation

avg-I added 2 commits October 29, 2015 16:13
…header

lzc_receive_with_header is like lzc_receive, but allows the caller to read
the begin record and then to pass it in.
That could be useful if the caller wants to derive, for example,
the snapname or the origin parameters based on the information contained
in the begin record. The begin record must be in its original form as read
from the stream, in other words, it should not be byteswapped.

'resumable' parameter does nothing and is added for forward compatibility.

lzc_receive_with_header rejects NULL value of begin_record parameter.
This function is specifically designed to be called after the
header has been read and so the header must be passed in.
With NULL begin_record the implementation would try to read
the header again.
@ryao
Copy link

ryao commented Nov 11, 2015

I am not a fan of hardcoding the dmu_replay_record_t into libzfs_core, but otherwise, this looks okay to me. I will merge it in the morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants