HomeFreeBSD

Fix issues found with zfs diff

Description

Fix issues found with zfs diff

Two deadlocks / ASSERT failures were introduced in a2c2ed1b which
would occur whenever arc_buf_fill() failed to decrypt a block of
data. This occurred because the call to arc_buf_destroy() which
was responsible for cleaning up the newly created buffer would
attempt to take out the hdr lock that it was already holding. This
was resolved by calling the underlying functions directly without
retaking the lock.

In addition, the dmu_diff() code did not properly ensure that keys
were loaded and mapped before begining dataset traversal. It turns
out that this code does not need to look at any encrypted values,
so the code was altered to perform raw IO only.

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

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on May 1 2018, 6:24 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 1 2018, 6:24 PM
Parents
rGd6133fc500ea: Silence compile-time warning on unused variable
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG2c24b5b14876: Fix issues found with zfs diff (authored by Tom Caputi <tcaputi@datto.com>).May 1 2018, 6:24 PM