Whamcloud - gitweb
LU-18536 statahead: dec inuse count when waiting entry timeout 82/57382/2
authorQian Yingjin <qian@ddn.com>
Tue, 3 Dec 2024 20:30:13 +0000 (04:30 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 2 Feb 2025 06:27:39 +0000 (06:27 +0000)
commit6703c05df0e60c5af46f59c4ff19d17a7d0a88fb
tree88463b632330266be24451a5173944e5b88234e9
parent51b425d63a4d9482448da633224d82fa9fb4ec5d
LU-18536 statahead: dec inuse count when waiting entry timeout

It should dec inuse entry count when waiting for entry state
timout:
->revalidate_statahead_dentry()
  ->!sa_ready(entry)
    ->wait_event_idle_timeout(sai->sai_waitq, sa_ready(entry),
      cfs_time_seconds(30));
    if (rc == 0) { /* Timeout */
/*
 * entry may not be ready, so it may be used by
 * inflight statahead RPC, don't free it.
 */
entry = NULL;
GOTO(out, rc = -EAGAIN);
    }

Otherwise, it may casue the statahead thread waiting endless for
the inuse count becomes zero.

Fixes: d22c78fde8d (LU-14361 statahead: wait inuse entry finished during cleanup)
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I5a6cba998362e5580924711d2ac059f7fe3de261
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57382
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/statahead.c