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


Groups > linux.kernel > #1510728 > unrolled thread

[PATCH 26/29] staging: lustre: ptlrpc: do not switch out-of-date context

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 26/29] staging: lustre: ptlrpc: do not switch out-of-date context James Simmons <jsimmons@infradead.org> - 2016-10-28 00:20 +0200

#1510728 — [PATCH 26/29] staging: lustre: ptlrpc: do not switch out-of-date context

FromJames Simmons <jsimmons@infradead.org>
Date2016-10-28 00:20 +0200
Subject[PATCH 26/29] staging: lustre: ptlrpc: do not switch out-of-date context
Message-ID<sx1bJ-7Qv-53@gated-at.bofh.it>
From: Sebastien Buisson <sebastien.buisson@bull.net>

When trying to replace a dead sec context with a new one, we must
ensure the new context is already up-to-date.
If it is not the case, just return from sptlrpc_req_replace_dead_ctx()
and come later when the new context has been updated.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6536
Reviewed-on: http://review.whamcloud.com/15708
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ptlrpc/sec.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 12f02ed..e860df7 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -515,6 +515,13 @@ static int sptlrpc_req_replace_dead_ctx(struct ptlrpc_request *req)
 
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(msecs_to_jiffies(MSEC_PER_SEC));
+	} else if (unlikely(!test_bit(PTLRPC_CTX_UPTODATE_BIT, &newctx->cc_flags))) {
+		/*
+		 * new ctx not up to date yet
+		 */
+		CDEBUG(D_SEC,
+		       "ctx (%p, fl %lx) doesn't switch, not up to date yet\n",
+		       newctx, newctx->cc_flags);
 	} else {
 		/*
 		 * it's possible newctx == oldctx if we're switching
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web