mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Fix ARC target collapse when zfs_arc_meta_limit_percent=100
Reclaim metadata when arc_available_memory < 0 even if meta_used is not bigger than arc_meta_limit. As described in https://github.com/openzfs/zfs/issues/14054 if zfs_arc_meta_limit_percent=100 then ARC target can collapse to arc_min due to arc_purge not freeing any metadata. This patch lets arc_prune to do its work when arc_available_memory is negative even if meta_used is not bigger than arc_meta_limit, avoiding ARC target collapse. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gionatan Danti <g.danti@assyoma.it> Closes #14054 Closes #14093
This commit is contained in:
parent
7822b50f54
commit
dc56c673e3
@ -4469,7 +4469,7 @@ restart:
|
|||||||
* meta buffers. Requests to the upper layers will be made with
|
* meta buffers. Requests to the upper layers will be made with
|
||||||
* increasingly large scan sizes until the ARC is below the limit.
|
* increasingly large scan sizes until the ARC is below the limit.
|
||||||
*/
|
*/
|
||||||
if (meta_used > arc_meta_limit) {
|
if (meta_used > arc_meta_limit || arc_available_memory() < 0) {
|
||||||
if (type == ARC_BUFC_DATA) {
|
if (type == ARC_BUFC_DATA) {
|
||||||
type = ARC_BUFC_METADATA;
|
type = ARC_BUFC_METADATA;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user