Commit c27d0a08 authored by Isaac Huang's avatar Isaac Huang Committed by Greg Kroah-Hartman
Browse files

staging: lustre: fix bogus lst errors for lnet selftest



It should not be counted as errors if a test RPC
has been stopped due to administrative actions,
e.g. lst end_session from the remote test console.

Signed-off-by: default avatarIsaac Huang <he.huang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4181
Reviewed-on: http://review.whamcloud.com/13279


Reviewed-by: default avatarAmir Shehata <amir.shehata@intel.com>
Reviewed-by: default avatarLiang Zhen <liang.zhen@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b204161
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1427,9 +1427,16 @@ srpc_lnet_ev_handler(lnet_event_t *ev)
	LASSERT(!in_interrupt());

	if (ev->status) {
		__u32 errors;

		spin_lock(&srpc_data.rpc_glock);
		if (ev->status != -ECANCELED) /* cancellation is not error */
			srpc_data.rpc_counters.errors++;
		errors = srpc_data.rpc_counters.errors;
		spin_unlock(&srpc_data.rpc_glock);

		CNETERR("LNet event status %d type %d, RPC errors %u\n",
			ev->status, ev->type, errors);
	}

	rpcev->ev_lnet = ev->type;