From: Oleg Drokin Date: Mon, 7 Jun 2021 19:17:27 +0000 (-0400) Subject: LU-14741 obdclass: Wake up queue of reqs on close completion X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c09ba17baacfa175834f2a5f46f1f3650eadb2cd;p=fs%2Flustre-release.git LU-14741 obdclass: Wake up queue of reqs on close completion Origin title: LU-14741 obdclass: Wake up entire queue of requests on close completion Since close requests could be stuck behind normal requests and get more slots we need to wake up entire accumulated queue waiting for the next modrpc slot or have additional waitqueue just for close requests. This patch goes with the former approach. Lustre-change: https://review.whamcloud.com/43941 Lustre-commit: a4e1567d67559b797a5c24ee0bfbca4a52649c47 Fixes: 1fc013f901 ("LU-5319 mdc: manage number of modify RPCs in flight") Change-Id: Ib4333c7f6731dd435364d5e5f529577a1600a235 Signed-off-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Neil Brown Reviewed-on: https://review.whamcloud.com/44288 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index f85dfd3..0f96861 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -2339,7 +2339,11 @@ void obd_put_mod_rpc_slot(struct client_obd *cli, __u32 opc, __u16 tag) LASSERT(tag - 1 < OBD_MAX_RIF_MAX); LASSERT(test_and_clear_bit(tag - 1, cli->cl_mod_tag_bitmap) != 0); spin_unlock(&cli->cl_mod_rpcs_lock); - wake_up(&cli->cl_mod_rpcs_waitq); + /* LU-14741 - to prevent close RPCs stuck behind normal ones */ + if (close_req) + wake_up_all(&cli->cl_mod_rpcs_waitq); + else + wake_up(&cli->cl_mod_rpcs_waitq); } EXPORT_SYMBOL(obd_put_mod_rpc_slot);