options: add support more POSIX errnos with negative support
Patch series to support masking expected system error with --ignore_error=.
The reason I wanted to mask with -EINVAL was exactly what you mentioned: with io_uring_cmd, the NVMe CQ entry’s status code can currently be masked through io_u->error. But you’re right — flipping the error-handling sign for all other cases just to accommodate a single ioengine shouldn’t happen.
Why can't you just use
--ignore_error=EINVALto maskEINVALinstead of relying on this patch and using--ignore_error=-EINVAL?
The problem is that if IO_U_F_DEVICE_ERROR is set and io_u->error contains the value 22 (0x16), we can’t tell whether that represents EINVAL (22) or an NVMe SGL Offset Invalid error (sct=0x0, sc=0x16).