Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e724acc authored by Henri Doreau's avatar Henri Doreau Committed by Greg Kroah-Hartman
Browse files

staging: lustre: ptlrpc: Forbid too early NRS policy tunings



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: default avatarHenri 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: default avatarEmoly Liu <emoly.liu@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8389249
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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