You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an XrdOfs plugin, the file open call will be handed to the plugin Open function.
In case validation fails, the plugin should return a status code (e.g: SFS_ERROR), with more details in the XrdOucErrInfo error object.
For the following code (XrdXRootdXeq.cc::1393):
// Open the file//if ((rc = fp->open(fn, (XrdSfsFileOpenMode)openopts,
(mode_t)mode, CRED, opaque)))
{rc = fsError(rc, opC, fp->error, fn, opaque); return rc;}
Providing a status != 0 will trigger parsing of the error object.
The errno from the error object is translated in the XProtocol::mapError() function.
However, for EINVAL, it defaults to kXR_FSError, which is a retryable error.
The complementary XProtocol::toErrno() function provides a mapping between kXR_ArgInvalid/kXR_ArgMissing to EINVAL.
There's no benefit in retrying an EINVAL error from the open call.
Would be useful to have a mapping between EINVAL to a kXR_ error code.
The text was updated successfully, but these errors were encountered:
mpatrascoiu
changed the title
No translation provided from errno "EINVAL" to XErrorCode "kXR_Invalid" in XrdXrootdProtocol::do_Open()
Returning errno "EINVAL" from Ofs plugin within XrdXrootdProtocol::do_Open() is translated to retryable error
Jul 29, 2019
When using an
XrdOfs
plugin, the file open call will be handed to the plugin Open function.In case validation fails, the plugin should return a status code (e.g:
SFS_ERROR
), with more details in theXrdOucErrInfo
error object.For the following code (XrdXRootdXeq.cc::1393):
Providing a status != 0 will trigger parsing of the error object.
The errno from the error object is translated in the XProtocol::mapError() function.
However, for EINVAL, it defaults to kXR_FSError, which is a retryable error.
The complementary
XProtocol::toErrno()
function provides a mapping betweenkXR_ArgInvalid
/kXR_ArgMissing
toEINVAL
.There's no benefit in retrying an
EINVAL
error from theopen
call.Would be useful to have a mapping between
EINVAL
to a kXR_ error code.The text was updated successfully, but these errors were encountered: