]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/arc.c
Fix the L2ARC write size calculating logic
authorGeorge Amanakis <gamanakis@gmail.com>
Tue, 6 Jun 2023 19:32:37 +0000 (21:32 +0200)
committerGitHub <noreply@github.com>
Tue, 6 Jun 2023 19:32:37 +0000 (12:32 -0700)
commitbcd5321039c3de29c14eac1068d392c15ad7fe2c
tree1fb8482d85b43939c2bc29d7917d3307aeacd238
parent8653f1de48ee5b41e2bf421785e1279a08c6b903
Fix the L2ARC write size calculating logic

l2arc_write_size() should return the write size after adjusting for trim
and overhead of the L2ARC log blocks. Also take into account the
allocated size of log blocks when deciding when to stop writing buffers
to L2ARC.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #14939
module/zfs/arc.c