]> git.proxmox.com Git - mirror_zfs.git/commit
Fix l2arc_apply_transforms ztest crash
authorPaul Dagnelie <pcd@delphix.com>
Tue, 19 Sep 2023 15:58:14 +0000 (08:58 -0700)
committerGitHub <noreply@github.com>
Tue, 19 Sep 2023 15:58:14 +0000 (08:58 -0700)
commit741c215bab32a0a823572769c3560729c78390ea
tree838dbd76ca3f73cf77dcd5358540bc220decb31c
parent6cb933c56ea6e865adfa37c394a77e3866f41dfb
Fix l2arc_apply_transforms ztest crash

In #13375 we modified the allocation size of the buffer that we use
to apply l2arc transforms to be the size of the arc hdr we're using,
rather than the allocation size that will be in place on the disk,
because sometimes the hdr size is larger. Unfortunately, sometimes
the allocation size is larger, which means that we overflow the buffer
in that case. This change modifies the allocation to be the max of
the two values

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #15177
Closes #15248
module/zfs/arc.c