]> git.proxmox.com Git - mirror_zfs.git/commit
ZIL: Do not encrypt block pointers in lr_clone_range_t
authorAlexander Motin <mav@FreeBSD.org>
Sun, 19 Nov 2023 01:01:03 +0000 (20:01 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Nov 2023 17:53:32 +0000 (09:53 -0800)
commit27d8c23c582056a23509a7b80844a1b6435750b0
tree7632b10ccd4e50e2c9487db38ded4a374e08104c
parent7bbd42ef49540e92a0dcd4abf9c6b24f98fbb7f4
ZIL: Do not encrypt block pointers in lr_clone_range_t

In case of crash cloned blocks need to be claimed on pool import.
It is only possible if they (lr_bps) and their count (lr_nbps) are
not encrypted but only authenticated, similar to block pointer in
lr_write_t.  Few other fields can be and are still encrypted.

This should fix panic on ZIL claim after crash when block cloning
is actively used.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Tom Caputi <caputit1@tcnj.edu>
Reviewed-by: Sean Eric Fagan <sef@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Edmund Nadolski <edmund.nadolski@ixsystems.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15543
Closes #15513
module/os/freebsd/zfs/zio_crypt.c
module/os/linux/zfs/zio_crypt.c