Skip to content

Commit 1bacd26

Browse files
committed
io_uring: mark reissue requests with REQ_F_PARTIAL_IO
If we mark for reissue, we assume that the buffer will remain stable. Hence if are using a provided buffer, we need to ensure that we stick with it for the duration of that request. This only affects block devices that use provided buffers, as those are the only ones that get marked with REQ_F_REISSUE. Signed-off-by: Jens Axboe <[email protected]>
1 parent 6436c77 commit 1bacd26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/io_uring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,7 +3437,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
34373437
if (unlikely(res != req->cqe.res)) {
34383438
if ((res == -EAGAIN || res == -EOPNOTSUPP) &&
34393439
io_rw_should_reissue(req)) {
3440-
req->flags |= REQ_F_REISSUE;
3440+
req->flags |= REQ_F_REISSUE | REQ_F_PARTIAL_IO;
34413441
return true;
34423442
}
34433443
req_set_fail(req);
@@ -3487,7 +3487,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res)
34873487
kiocb_end_write(req);
34883488
if (unlikely(res != req->cqe.res)) {
34893489
if (res == -EAGAIN && io_rw_should_reissue(req)) {
3490-
req->flags |= REQ_F_REISSUE;
3490+
req->flags |= REQ_F_REISSUE | REQ_F_PARTIAL_IO;
34913491
return;
34923492
}
34933493
req->cqe.res = res;

0 commit comments

Comments
 (0)