From d3157bc43390b56e2de2c7251802a67ccebe4952 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Mon, 4 Mar 2024 17:26:30 +0100 Subject: [PATCH] LU-17605 obdclass: do not wait forever acquiring entry The process of refreshing an entry via refresh_entry() goes through an upcall/downcall. If the upcall succeeds, we enter a wait queue. If after that the downcall is never called, we hit the expiry timeout, and we get removed from the wait queue. But if the entry is not new, the expiry time will be MAX_SCHEDULE_TIMEOUT == LONG_MAX, which means an infinite wait. So avoid waiting forever if an entry could not be refreshed, and call wake_up_all() if the wait for the ACQUIRING state failed. Signed-off-by: Sebastien Buisson Change-Id: I50ee59654adc221027c79cb68fa182b9abed50fa Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54269 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/obdclass/upcall_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lustre/obdclass/upcall_cache.c b/lustre/obdclass/upcall_cache.c index 39eb199..05be32d 100644 --- a/lustre/obdclass/upcall_cache.c +++ b/lustre/obdclass/upcall_cache.c @@ -283,6 +283,7 @@ find_with_lock: entry->ue_key, rc); goto find_again; } + wake_up_all(&entry->ue_waitq); CERROR("%s: acquire for key %lld after %llu: rc = %d\n", cache->uc_name, entry->ue_key, cache->uc_acquire_expire, rc); -- 1.8.3.1