Some libzfs_core.h functions (lzc_receive_with_header(), lzc_receive_one(), lzc_receive_with_cmdprops()) take struct dmu_replay_record as an argument (only required for lzc_receive_with_header()), which is expected to have been read out of the fd.
In libzfs_core.h, struct dmu_replay_record is forward declared, and never defined within libzfs_core.h (or it's transitive includes). The definition for struct dmu_replay_record instead lives in include/sys/zfs_ioctl.h. zfs_ioctl.h defines a large number of other items that probably aren't meant to be part of the libzfs_core API (and it's includes declare functions that aren't included in libzfs_core). But even if we try to use zfs_ioctl.h, it isn't installed (it's marked as a KERNEL_H in the relevant makefile).
Internal userspace commands aren't affected by this because they include zfs_ioctl.h directly from the source tree. The python bindings for lzc include a minimized copy of the dmu_replay_record definition instead of using any provided headers.
System information
Type
Version/Name
Distribution Name
Arch
Distribution Version
N/A
Linux Kernel
5.9.13
Architecture
x86_64
ZFS Version
2.0.0-1
SPL Version
2.0.0-1
Describe the problem you're observing
No definition of struct dmu_replay_record exists in libzfs_core.h or other installed headers
Describe how to reproduce the problem
Try to call lzc_receive_with_header() from a program that isn't part of the zfs source tree.
This is somewhat related, but as an opposite of #11236
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.
Some
libzfs_core.h
functions (lzc_receive_with_header()
,lzc_receive_one()
,lzc_receive_with_cmdprops()
) takestruct dmu_replay_record
as an argument (only required forlzc_receive_with_header()
), which is expected to have been read out of the fd.In
libzfs_core.h
,struct dmu_replay_record
is forward declared, and never defined withinlibzfs_core.h
(or it's transitive includes). The definition forstruct dmu_replay_record
instead lives ininclude/sys/zfs_ioctl.h
.zfs_ioctl.h
defines a large number of other items that probably aren't meant to be part of thelibzfs_core
API (and it's includes declare functions that aren't included inlibzfs_core
). But even if we try to usezfs_ioctl.h
, it isn't installed (it's marked as aKERNEL_H
in the relevant makefile).Internal userspace commands aren't affected by this because they include
zfs_ioctl.h
directly from the source tree. The python bindings for lzc include a minimized copy of thedmu_replay_record
definition instead of using any provided headers.System information
Describe the problem you're observing
No definition of
struct dmu_replay_record
exists inlibzfs_core.h
or other installed headersDescribe how to reproduce the problem
Try to call
lzc_receive_with_header()
from a program that isn't part of the zfs source tree.This is somewhat related, but as an opposite of #11236