Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1510723 > unrolled thread

[PATCH 28/29] staging: lustre: ptlrpc: imp_peer_committed_transno should increase

Started byJames Simmons <jsimmons@infradead.org>
First post2016-10-28 00:20 +0200
Last post2016-10-28 00:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 28/29] staging: lustre: ptlrpc: imp_peer_committed_transno should increase James Simmons <jsimmons@infradead.org> - 2016-10-28 00:20 +0200

#1510723 — [PATCH 28/29] staging: lustre: ptlrpc: imp_peer_committed_transno should increase

FromJames Simmons <jsimmons@infradead.org>
Date2016-10-28 00:20 +0200
Subject[PATCH 28/29] staging: lustre: ptlrpc: imp_peer_committed_transno should increase
Message-ID<sx1bJ-7Qv-67@gated-at.bofh.it>
From: Alex Zhuravlev <alexey.zhuravlev@intel.com>

imp_peer_committed_transno should not decrease as this can
confuse the users if imp_peer_committed_transno is used to
check commit status.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7079
Reviewed-on: http://review.whamcloud.com/16161
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ptlrpc/client.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
index cc4b129..7cbfb4c 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -1242,6 +1242,7 @@ static int after_reply(struct ptlrpc_request *req)
 	int rc;
 	struct timespec64 work_start;
 	long timediff;
+	u64 committed;
 
 	LASSERT(obd);
 	/* repbuf must be unlinked */
@@ -1400,10 +1401,9 @@ static int after_reply(struct ptlrpc_request *req)
 		}
 
 		/* Replay-enabled imports return commit-status information. */
-		if (lustre_msg_get_last_committed(req->rq_repmsg)) {
-			imp->imp_peer_committed_transno =
-				lustre_msg_get_last_committed(req->rq_repmsg);
-		}
+		committed = lustre_msg_get_last_committed(req->rq_repmsg);
+		if (likely(committed > imp->imp_peer_committed_transno))
+			imp->imp_peer_committed_transno = committed;
 
 		ptlrpc_free_committed(imp);
 
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web