]> git.proxmox.com Git - mirror_zfs.git/commit
L2ARC: Restrict write size to 1/4 of the device
authorAlexander Motin <mav@FreeBSD.org>
Tue, 14 Nov 2023 21:47:57 +0000 (16:47 -0500)
committerGitHub <noreply@github.com>
Tue, 14 Nov 2023 21:47:57 +0000 (13:47 -0800)
commit35da34516074637f3e9d8c74588e7e3eaa01983a
tree06e92322cccb03cfd036286cfe78f9497db93fa7
parentda51bd17e5c3af7679d4dbe89a27057e7fc92fe0
L2ARC: Restrict write size to 1/4 of the device

PR #15457 exposed weird logic in L2ARC write sizing. If it appeared
bigger than device size, instead of liming write it reset all the
system-wide tunables to their default.  Aside of being excessive,
it did not actually help with the problem, still allowing infinite
loop to happen.

This patch removes the tunables reverting logic, but instead limits
L2ARC writes (or at least eviction/trim) to 1/4 of the capacity.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Amanakis <gamanakis@gmail.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15519
module/zfs/arc.c
tests/zfs-tests/tests/functional/cache/cache_012_pos.ksh