From e886e3308f29abbdbe570d1c9571d485caa41626 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. 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 --- 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 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 && -- 1.8.3.1