]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
L2ARC: Cleanup buffer re-compression
authorAlexander Motin <mav@FreeBSD.org>
Tue, 23 Apr 2024 16:06:00 +0000 (12:06 -0400)
committerGitHub <noreply@github.com>
Tue, 23 Apr 2024 16:06:00 +0000 (09:06 -0700)
commit1f940de07224c2068e7c721222b1f3a519820ca9
treea7d31ddbe0e37f98d5fbb13afd8935197b712cff
parent87d81d1d13e0ef848d2d533a4f12f5de41026e73
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
module/zfs/arc.c