Skip to content

Commit d40d409

Browse files
authored
Evicting too many bytes from MFU metadata
Without updating 'm' we evict from MFU metadata all that we wanted to evict from all metadata, including already evicted MRU metadata ('m' is the total amount of metadata we had at the beginning, and 'w' is the total amount of metadata we want to have). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Theera K. <tkittich@hotmail.com> Closes openzfs#16521 Closes openzfs#16546
1 parent 9c03b22 commit d40d409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/arc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4325,7 +4325,7 @@ arc_evict(void)
43254325

43264326
/* Evict MFU metadata. */
43274327
w = wt * (int64_t)(arc_meta >> 16) >> 16;
4328-
e = MIN((int64_t)(asize - arc_c), (int64_t)(m - w));
4328+
e = MIN((int64_t)(asize - arc_c), (int64_t)(m - bytes - w));
43294329
bytes = arc_evict_impl(arc_mfu, ARC_BUFC_METADATA, e);
43304330
total_evicted += bytes;
43314331
mfum -= bytes;

0 commit comments

Comments
 (0)