Whamcloud - gitweb
LU-18516 quota: use wait_woken for qsd_op_begin0() 56/58156/3
authorJames Simmons <jsimmons@infradead.org>
Sat, 22 Feb 2025 12:56:17 +0000 (07:56 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:07:27 +0000 (08:07 +0000)
commit2417aeddc649840179a2575a28fdedf3fe662916
tree5bd009531ce7224fc683396fa14839e8a23884a9
parent0be2adfe3c46e3d67a7f0e7b557adc8c2afd5ce6
LU-18516 quota: use wait_woken for qsd_op_begin0()

Kernels with debugging enabled report for Lustre quota handling:

do not call blocking ops when !TASK_RUNNING;
? __might_sleep+0x9d/0xc0
  down_read_nested+0x2e/0x4b0
  lquota_disk_read+0x46e/0x800 [lquota]
  qsd_refresh_usage+0x105/0x3d0 [lquota]
  qsd_acquire+0xbe/0x7c0 [lquota]
  qsd_op_begin0+0x5f8/0xc80 [lquota]

This is due to qsd_acquire() performing operations that can sleep while
the kthread is in an idle state. The Linux kernel solution for this
is wait_woken(). Move the function qsd_op_begin0() from using
wait_event_idle_timeout() to wait_woken(). This will resolve the
potential sleeping issues.

Test-Parameters: trivial testlist=sanity-quota
Change-Id: Id2b7a5886869bf0ed3d560e159524dcda841d8b0
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58156
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/qsd_handler.c