zfs/tests/zfs-tests/include
George Amanakis 37c22948e5
Reset l2ad_hand and l2ad_first in l2arc_evict
Increasing l2arc_write_size or l2arc_write_boost can result in
l2arc_write_buffers() not having enough space to perform its writes and
panic zio_write_phys().

Instead of resetting l2ad_hand to l2ad_start at the end of
l2arc_write_buffers() and not taking into account a possible
user-mediated increase of l2arc_write_max, we do this in l2arc_evict(),
right after l2arc_write_size() has run. If there is not enough space to
evict (ie we will exceed l2ad_end) we evict to the end of the device,
reset l2ad_hand to l2ad_start, set l2ad_first to 0 and iterate
l2arc_evict(). We avoid infinite iteration of l2arc_evict() by making
sure in l2arc_write_size() that l2ad_start + size does not exceed
l2ad_end.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #10154
2020-03-31 10:46:48 -07:00
..
.gitignore Add zpool events tests 2017-05-22 12:34:42 -04:00
Makefile.am ZTS: Catalog tunable names for tests in tunables.cfg 2020-01-14 14:57:28 -08:00
blkdev.shlib ZTS: Another round of changes for FreeBSD 2020-03-06 09:31:32 -08:00
commands.cfg ZTS: Misc fixes for FreeBSD 2020-02-27 09:38:34 -08:00
default.cfg.in ZTS: Fix a few defaults 2020-01-31 08:51:23 -08:00
libtest.shlib Reset l2ad_hand and l2ad_first in l2arc_evict 2020-03-31 10:46:48 -07:00
math.shlib ZTS: Eliminate functions named 'random' 2020-01-08 09:08:30 -08:00
properties.shlib ZTS: Don't use edonr on FreeBSD 2020-01-28 08:38:02 -08:00
tunables.cfg Reset l2ad_hand and l2ad_first in l2arc_evict 2020-03-31 10:46:48 -07:00
zpool_script.shlib zfs-tests: fix warnings when packaging some .shlib files 2019-05-24 14:12:14 -07:00