Commit d38c0ca
committed
io_u: check non-fatal error with IO_U_F_DEVICE_ERROR
IO_U_F_DEVICE_ERROR has been introduced in Commit ebe67b6
("io_uring: Add IO_U_F_DEVICE_ERROR to identify error types") to parse
two different types of errors can happen: (1) device error(e.g.,
NVMe-specific error status code) and (2) system error(e.g., EINVAL).
`--ignore_error=` option let user mask expected situation, but if user
wants to mask system error rather than device error, no way to represent
the system error except for such as -EINVAL. Even if user put -EINVAL
to the option, it will be checked as a positive value since @io_u->error
will be set with abs() in io_uring_cmd ioengine.
This patch flips the given @io_u->error positive value to a negative
value if the given @io_u->flags represents system error by
IO_U_F_DEVICE_ERROR.
Signed-off-by: Minwoo Im <[email protected]>1 parent 90c3006 commit d38c0ca
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2196 | 2196 | | |
2197 | 2197 | | |
2198 | 2198 | | |
2199 | | - | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
2200 | 2209 | | |
2201 | 2210 | | |
2202 | 2211 | | |
| |||
0 commit comments