zfs/module
George Amanakis c12b5829e1 Fix the L2ARC write size calculating logic (2)
While commit bcd5321 adjusts the write size based on the size of the log
block, this happens after comparing the unadjusted write size to the
evicted (target) size.

In this case l2ad_hand will exceed l2ad_evict and violate an assertion
at the end of l2arc_write_buffers().

Fix this by adding the max log block size to the allocated size of the
buffer to be committed before comparing the result to the target
size.

Also reset the l2arc_trim_ahead ZFS module variable when the adjusted
write size exceeds the size of the L2ARC device.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #14936
Closes #14954
2023-06-26 13:59:36 -07:00
..
avl AVL: Remove obsolete branching optimizations 2022-07-26 10:10:37 -07:00
icp Fix Clang 15 compilation errors 2023-06-05 18:25:57 -07:00
lua Fix Clang 15 compilation errors 2023-06-05 18:25:57 -07:00
nvpair Update `checkstyle` workflow env to ubuntu-20.04 2021-12-08 13:27:56 -08:00
os Fix Clang 15 compilation errors 2023-06-05 18:25:57 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Illumos #15286: do_composition() needs sign awareness 2023-01-19 12:50:42 -08:00
zcommon Fix Clang 15 compilation errors 2023-06-05 18:25:57 -07:00
zfs Fix the L2ARC write size calculating logic (2) 2023-06-26 13:59:36 -07:00
zstd module: zstd: check we don't leak symbols; regenerate symbol map 2022-05-16 15:48:21 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-09-28 10:35:13 -07:00
Kbuild.in Fix Clang 15 compilation errors 2023-06-05 18:25:57 -07:00
Makefile.bsd FreeBSD: Silence clang unused-but-set-variable 2022-06-15 11:27:28 -07:00
Makefile.in Add support for $KERNEL_{CC,LD,LLVM} variables 2022-02-16 17:58:55 -08:00