From 14c22d4bdde43ca98bd53d232062b5c1f80b14f2 Mon Sep 17 00:00:00 2001 From: George Amanakis Date: Sat, 25 May 2024 04:02:58 +0200 Subject: [PATCH] Fix assertion in Persistent L2ARC At the end of l2arc_evict() fix an assertion in the case that l2ad_hand + distance == l2ad_end. Reviewed-by: Brian Behlendorf Signed-off-by: George Amanakis Closes #16202 Closes #16207 --- module/zfs/arc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 17bb8a6a7810..836005d096b0 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -8890,7 +8890,7 @@ l2arc_evict(l2arc_dev_t *dev, uint64_t distance, boolean_t all) * assertions may be violated without functional consequences * as the device is about to be removed. */ - ASSERT3U(dev->l2ad_hand + distance, <, dev->l2ad_end); + ASSERT3U(dev->l2ad_hand + distance, <=, dev->l2ad_end); if (!dev->l2ad_first) ASSERT3U(dev->l2ad_hand, <=, dev->l2ad_evict); }