From 2b215d3763a8a37ff9d65bf1a250fcdaa27c4bdf Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 20 Sep 2018 17:15:42 +0300 Subject: [PATCH] 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 --- lustre/osc/osc_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 && -- 1.8.3.1