HomeFreeBSD

Fix issues with raw receive_write_byref()

Description

Fix issues with raw receive_write_byref()

This patch fixes 2 issues with raw, deduplicated send streams. The
first is that datasets who had been completely received earlier in
the stream were not still marked as raw receives. This caused
problems when newly received datasets attempted to fetch raw data
from these datasets without this flag set.

The second problem was that the arc freeze checksum code was not
consistent about which locks needed to be held while performing
its asserts. The proper locking needed to run these asserts is
actually fairly nuanced, since the asserts touch the linked list
of buffers (requiring the header lock), the arc_state (requiring
the b_evict_lock), and the b_freeze_cksum (requiring the
b_freeze_lock). This seems like a large performance sacrifice and
a lot of unneeded complexity to verify that this relatively small
debug feature is working as intended, so this patch simply removes
these asserts instead.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7701

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Aug 20 2018, 6:03 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 20 2018, 6:03 PM
Parents
rGc962fd6c4e38: pyzfs: add missing libzfs_core functions
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG149ce888bb14: Fix issues with raw receive_write_byref() (authored by Tom Caputi <tcaputi@datto.com>).Aug 20 2018, 6:03 PM