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


Groups > linux.kernel > #1510720 > unrolled thread

[PATCH 24/29] staging: lustre: ptlrpc: Forbid too early NRS policy tunings

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 24/29] staging: lustre: ptlrpc: Forbid too early NRS policy tunings James Simmons <jsimmons@infradead.org> - 2016-10-28 00:20 +0200

#1510720 — [PATCH 24/29] staging: lustre: ptlrpc: Forbid too early NRS policy tunings

FromJames Simmons <jsimmons@infradead.org>
Date2016-10-28 00:20 +0200
Subject[PATCH 24/29] staging: lustre: ptlrpc: Forbid too early NRS policy tunings
Message-ID<sx1bJ-7Qv-65@gated-at.bofh.it>
From: Henri Doreau <henri.doreau@cea.fr>

Wait for a NRS policy to be fully started before allowing
to apply related tunings, so that all fields are properly
initialized.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6673
Reviewed-on: http://review.whamcloud.com/15104
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ptlrpc/nrs.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/nrs.c b/drivers/staging/lustre/lustre/ptlrpc/nrs.c
index d88faf6..f856632 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/nrs.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/nrs.c
@@ -619,6 +619,15 @@ static int nrs_policy_ctl(struct ptlrpc_nrs *nrs, char *name,
 		goto out;
 	}
 
+	/**
+	 * Wait for the policy to be fully started before attempting
+	 * to operate it.
+	 */
+	if (policy->pol_state == NRS_POL_STATE_STARTING) {
+		rc = -EAGAIN;
+		goto out;
+	}
+
 	switch (opc) {
 		/**
 		 * Unknown opcode, pass it down to the policy-specific control
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web