Commit 4c8a951
ublk: setup ublk_io correctly in case of ublk_get_data() failure
If ublk_get_data() fails, -EIOCBQUEUED is returned and the current command
becomes ASYNC. And the only reason is that mapping data can't move on,
because of no enough pages or pending signal, then the current ublk request
has to be requeued.
Once the request need to be requeued, we have to setup `ublk_io` correctly,
including io->cmd and flags, otherwise the request may not be forwarded to
ublk server successfully.
Fixes: 9810362 ("ublk: don't call ublk_dispatch_req() for NEED_GET_DATA")
Reported-by: Changhui Zhong <[email protected]>
Closes: https://lore.kernel.org/linux-block/CAGVVp+VN9QcpHUz_0nasFf5q9i1gi8H8j-G-6mkBoqa3TyjRHA@mail.gmail.com/
Signed-off-by: Ming Lei <[email protected]>
Tested-by: Changhui Zhong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 81b4d1a commit 4c8a951
1 file changed
+25
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1148 | 1148 | | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | | - | |
1152 | | - | |
| 1151 | + | |
| 1152 | + | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1167 | 1174 | | |
1168 | 1175 | | |
1169 | 1176 | | |
| |||
2157 | 2164 | | |
2158 | 2165 | | |
2159 | 2166 | | |
2160 | | - | |
| 2167 | + | |
| 2168 | + | |
2161 | 2169 | | |
2162 | | - | |
2163 | | - | |
2164 | 2170 | | |
2165 | 2171 | | |
2166 | 2172 | | |
| |||
2187 | 2193 | | |
2188 | 2194 | | |
2189 | 2195 | | |
| 2196 | + | |
2190 | 2197 | | |
2191 | 2198 | | |
2192 | 2199 | | |
| |||
2245 | 2252 | | |
2246 | 2253 | | |
2247 | 2254 | | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
2252 | | - | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
2253 | 2268 | | |
2254 | 2269 | | |
2255 | 2270 | | |
| |||
0 commit comments