Whamcloud - gitweb
LU-17929 ptlrpc: ptlrpc_request_alloc_pack() always returns an error code
Current code was always considering that when this function
returns NULL it meant ENOMEM error, but this is not always
true, especially when using GSS by example, or when
reconnecting from an IDLE state.
Also, instead of having every caller converting NULL to
ENOMEM, do that directly in the function when
appropriate.
Make ptlrpc_request_alloc_pack() return -errno in case
of error instead of a NULL pointer.
Thanks to that change, error code will be propagated up
and will help error reporting and debugging.
Took the opportunity to simplify related error path
for 2 HSM functions.
Also changed param.status to a signed data, as it can
store -errno.
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Change-Id: Id2b873d5f0c5cb89db070f6db00269545e6c85e8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55391
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
14 files changed: