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
..
2019-07-26 10:54:14 -07:00
2019-06-19 09:48:12 -07:00
2019-06-19 09:48:12 -07:00
2020-03-27 09:11:22 -07:00
2019-10-09 10:36:03 -07:00
2019-12-03 09:51:44 -08:00
2020-02-24 15:38:22 -08:00
2019-09-02 17:56:41 -07:00
2017-10-11 16:54:48 -04:00
2019-10-01 13:17:32 -07:00
2015-01-16 14:41:26 -08:00
2020-03-27 09:11:22 -07:00
2019-06-19 09:48:12 -07:00
2019-10-11 10:13:21 -07:00
2010-08-31 13:41:58 -07:00
2019-09-02 17:56:41 -07:00
2020-03-04 15:07:11 -08:00
2019-10-09 10:36:03 -07:00
2020-02-27 09:31:02 -08:00
2019-06-20 18:29:02 -07:00
2020-01-23 11:01:24 -08:00
2019-06-20 18:29:02 -07:00
2020-03-04 15:07:11 -08:00
2019-09-05 14:49:49 -07:00
2019-09-02 17:56:41 -07:00
2019-09-02 17:56:41 -07:00
2019-10-02 09:15:12 -07:00
2019-11-11 09:27:59 -08:00
2019-12-05 13:10:29 -08:00
2020-03-27 09:11:22 -07:00
2018-02-09 10:08:05 -08:00
2019-07-26 10:54:14 -07:00