diff options
author | Isaac Huang <he.huang@intel.com> | 2016-03-12 04:29:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-12 09:24:47 +0300 |
commit | c27d0a081f250096953651c6fb109d582307c299 (patch) | |
tree | a0029d5c61727f9dd32573b0a107437970b0f9b4 /drivers | |
parent | 0b204161eecf813e13a3ee169b1e21dfe9d9ed35 (diff) | |
download | linux-c27d0a081f250096953651c6fb109d582307c299.tar.xz |
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: Isaac 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: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/rpc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c index 5eb42327fb50..60d38df2327e 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.c +++ b/drivers/staging/lustre/lnet/selftest/rpc.c @@ -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); - srpc_data.rpc_counters.errors++; + 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; |