HomeFreeBSD

L2ARC: Cleanup buffer re-compression

Description

L2ARC: Cleanup buffer re-compression

When compressed ARC is disabled, we may have to re-compress when
writing into L2ARC. If doing so we can't fit it into the original
physical size, we should just fail immediately, since even if it
may still fit into allocation size, its checksum will never match.

While there, refactor the code similar to other compression places
without using abd_return_buf_copy().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16038

Details

Provenance
mavAuthored on Apr 23 2024, 4:06 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 29 2024, 3:54 PM
Parents
rGb474dfad0d9d: Refactor dbuf_read() for safer decryption
Branches
Unknown
Tags
Unknown