Whamcloud - gitweb
LU-11409 osc: grant shrink shouldn't account skipped OSC 64/40564/5
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 20 Sep 2018 14:15:42 +0000 (17:15 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 4 Mar 2021 08:34:45 +0000 (08:34 +0000)
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 <bzzz@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40564
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_request.c

index 093bd82..4c0f5af 100644 (file)
@@ -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 &&