HomeFreeBSD

Fix incremental receive silently failing for recursive sends

Description

Fix incremental receive silently failing for recursive sends

The problem occurs because dmu_recv_begin pulls in the payload and
next header from the input stream in order to use the contents of
the begin record's nvlist. However, the change to do that before the
other checks in dmu_recv_begin occur caused a regression where an
empty send stream in a recursive send could have its END record
consumed by this, which broke the logic of recv_skip. A test is
also included to protect against this case in the future.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #12661
Closes #14568

Details

Provenance
pcd_delphix.comAuthored on Mar 10 2023, 5:52 PM
GitHub <noreply@github.com>Committed on Mar 10 2023, 5:52 PM
Parents
rG589f59b52af8: Workaround for Linux PowerPC GPL-only cpu_has_feature()
Branches
Unknown
Tags
Unknown