mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 04:07:45 +03:00
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
This commit is contained in:
@@ -49,7 +49,7 @@ post =
|
||||
[tests/functional/cache]
|
||||
tests = ['cache_001_pos', 'cache_002_pos', 'cache_003_pos', 'cache_004_neg',
|
||||
'cache_005_neg', 'cache_006_pos', 'cache_007_neg', 'cache_008_neg',
|
||||
'cache_009_pos', 'cache_010_neg', 'cache_011_pos']
|
||||
'cache_009_pos', 'cache_010_neg', 'cache_011_pos', 'cache_012_pos']
|
||||
tags = ['functional', 'cache']
|
||||
|
||||
[tests/functional/cachefile]
|
||||
|
||||
Reference in New Issue
Block a user