HomeFreeBSD

Encrypted dnode blocks should be prefetched raw

Description

Encrypted dnode blocks should be prefetched raw

Encrypted dnode blocks are always initially read as raw data and
converted to decrypted data when an encrypted bonus buffer is
needed. This allows the DMU to be used for things like fetching
the DMU master node without requiring keys to be loaded. However,
dbuf_issue_final_prefetch() does not currently read the data as
raw. The end result of this is that prefetched dnode blocks are
read twice from disk: once decrypted and then again as raw data.
This patch corrects the issue by adding the flag when appropriate.

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

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Mar 31 2018, 6:11 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 31 2018, 6:11 PM
Parents
rG77d8a0f1a4d0: Fix hung z_zvol tasks during 'zfs receive'
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG4515b1d01c93: Encrypted dnode blocks should be prefetched raw (authored by Tom Caputi <tcaputi@datto.com>).Mar 31 2018, 6:11 PM