summaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-09-10 10:45:46 -0700
committerGitHub <[email protected]>2019-09-10 10:45:46 -0700
commitb88ca2acf5129fe1fa7817b9d1dbf6a2ad43cda9 (patch)
tree145f03bedf3ea850142885ae23c68f9a223597df /module/zfs/arc.c
parentb63e2d881f859f0c7d8596be2759dd096e324f48 (diff)
Enable SIMD for encryption
When adding the SIMD compatibility code in e5db313 the decryption of a dataset wrapping key was left in a user thread context. This was done intentionally since it's a relatively infrequent operation. However, this also meant that the encryption context templates were initialized using the generic operations. Therefore, subsequent encryption and decryption operations would use the generic implementation even when executed by an I/O pipeline thread. Resolve the issue by initializing the context templates in an I/O pipeline thread. And by updating zio_do_crypt_uio() to dispatch any encryption operations to a pipeline thread when called from the user context. For example, when performing a read from the ARC. Tested-by: Attila Fülöp <[email protected]> Reviewed-by: Tom Caputi <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9215 Closes #9296
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 187158955..21f3dee07 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -8828,7 +8828,7 @@ l2arc_apply_transforms(spa_t *spa, arc_buf_hdr_t *hdr, uint64_t asize,
if (ret != 0)
goto error;
- ret = zio_do_crypt_abd(B_TRUE, &dck->dck_key,
+ ret = zio_do_crypt_abd(spa, B_TRUE, &dck->dck_key,
hdr->b_crypt_hdr.b_ot, bswap, hdr->b_crypt_hdr.b_salt,
hdr->b_crypt_hdr.b_iv, mac, psize, to_write, eabd,
&no_crypt);