Whamcloud - gitweb
LU-17605 obdclass: do not wait forever acquiring entry 69/54269/2
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 4 Mar 2024 16:26:30 +0000 (17:26 +0100)
committerOleg Drokin <green@whamcloud.com>
Sat, 23 Mar 2024 05:57:22 +0000 (05:57 +0000)
commitd3157bc43390b56e2de2c7251802a67ccebe4952
treee7fee4f1296ae7fdab6c7bfedfd1999f12180c3b
parent7a2296a397381a5f6f9473b297f0062e8ff15948
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 <sbuisson@ddn.com>
Change-Id: I50ee59654adc221027c79cb68fa182b9abed50fa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54269
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/upcall_cache.c