Whamcloud - gitweb
LU-9793 ptlrpc: Do not map unrecognized ELDLM errnos to EIO 71/33471/3
authorAnn Koehler <amk@cray.com>
Tue, 13 Nov 2018 16:47:20 +0000 (11:47 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Nov 2018 17:09:16 +0000 (17:09 +0000)
The lustre_errno_hton and lustre_errno_ntoh functions map between
host and network error numbers before they are sent over the network.
If an errno is unrecognized then it is mapped to EIO.

However an optimization for x86 and i386 architectures replaced the
functions with macros that simply return the original errno. The
result is that x86 and i386 return the original values for ELDLM
errnos and all other architectures return EIO. This difference is
known to break glimpse lock callback handling which depends on clients
responding with ELDLM_NO_LOCK_DATA. The difference in errnos may
result in other as yet unidentified bugs.

The fix defines mappings for the ELDLM errors that leaves the values
unchanged. Error numbers not found in the mapping tables are still
mapped to EIO.

Cray-bug-id: LUS-6057
Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I0b4e1e0dc6de065729e18f2381ec9cfc58fe31db
Reviewed-on: https://review.whamcloud.com/33471
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

No differences found