diff mbox series

[234/622] lustre: osc: grant shrink shouldn't account skipped OSC

Message ID 1582838290-17243-235-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync closely to 2.13.52 | expand

Commit Message

James Simmons Feb. 27, 2020, 9:11 p.m. UTC
From: Alex Zhuravlev <bzzz@whamcloud.com>

otherwise only the first 100 OSCs are subject to grant shrink procedure.

WC-bug-id: https://jira.whamcloud.com/browse/LU-11409
Lustre-commit: 2b215d3763a8 ("LU-11409 osc: grant shrink shouldn't account skipped OSC")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33206
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/osc/osc_request.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c
index 7b120da..14180a4 100644
--- a/fs/lustre/osc/osc_request.c
+++ b/fs/lustre/osc/osc_request.c
@@ -879,9 +879,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 &&