From: Alex Zhuravlev Date: Thu, 20 Sep 2018 14:15:42 +0000 (+0300) Subject: LU-11409 osc: grant shrink shouldn't account skipped OSC X-Git-Tag: 2.12.53~108 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2b215d3763a8a37ff9d65bf1a250fcdaa27c4bdf LU-11409 osc: grant shrink shouldn't account skipped OSC otherwise only the first 100 OSCs are subject to grant shrink procedure. Change-Id: I65ed247b91422effb8f278d1991d4a5ba1c24814 Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/33206 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 994201e..e1d0333 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -882,9 +882,11 @@ static void osc_grant_work_handler(struct work_struct *data) mutex_lock(&client_gtd.gtd_mutex); list_for_each_entry(cli, &client_gtd.gtd_clients, cl_grant_chain) { - if (++rpc_sent < GRANT_SHRINK_RPC_BATCH && - osc_should_shrink_grant(cli)) + if (rpc_sent < GRANT_SHRINK_RPC_BATCH && + osc_should_shrink_grant(cli)) { osc_shrink_grant(cli); + rpc_sent++; + } if (!init_next_shrink) { if (cli->cl_next_shrink_grant < next_shrink &&