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.7-RC1~70 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e886e3308f29abbdbe570d1c9571d485caa41626;p=fs%2Flustre-release.git LU-11409 osc: grant shrink shouldn't account skipped OSC otherwise only the first 100 OSCs are subject to grant shrink procedure. Lustre-commit: 2b215d3763a8a37ff9d65bf1a250fcdaa27c4bdf Lustre-change: https://review.whamcloud.com/33206 Change-Id: I65ed247b91422effb8f278d1991d4a5ba1c24814 Signed-off-by: Alex Zhuravlev Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-on: https://review.whamcloud.com/40564 Tested-by: jenkins Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 093bd82..4c0f5af 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -883,9 +883,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 &&