mirror_zfs/module
Tom Caputi b7ddeaef3d Refactor arc_hdr_realloc_crypt()
The arc_hdr_realloc_crypt() function is responsible for converting
a "full" arc header to an extended "crypt" header and visa versa.
This code was originally written with a bcopy() so that any new
members added to arc headers would automatically be included
without requiring a code change. However, in practice this (along
with small differences in kmem_cache implementations between
various platforms) has caused a number of hard-to-find problems in
ports to other operating systems. This patch solves this problem
by making all member copies explicit and adding ASSERTs for fields
that cannot be set during the transfer. It also manually resets the
old header after the reallocation is finished so it can be properly
reallocated and reused.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7711
2018-07-24 12:20:04 -07:00
..
avl Update build system and packaging 2018-05-29 16:00:33 -07:00
icp Fix kernel unaligned access on sparc64 2018-07-11 13:10:40 -07:00
lua Update build system and packaging 2018-05-29 16:00:33 -07:00
nvpair Update build system and packaging 2018-05-29 16:00:33 -07:00
spl Add pool state /proc entry, "SUSPENDED" pools 2018-06-06 09:33:54 -07:00
unicode Update build system and packaging 2018-05-29 16:00:33 -07:00
zcommon OpenZFS 9337 - zfs get all is slow due to uncached metadata 2018-07-12 10:49:27 -07:00
zfs Refactor arc_hdr_realloc_crypt() 2018-07-24 12:20:04 -07:00
.gitignore Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Makefile.in Update build system and packaging 2018-05-29 16:00:33 -07:00