]> www.infradead.org Git - users/hch/block.git/commitdiff
io_uring: ask for bio caching
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Aug 2021 11:02:18 +0000 (13:02 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 11 Aug 2021 11:06:57 +0000 (13:06 +0200)
Ask for dipping into the bio pool when doing polled I/O.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/io_uring.c

index bf548af0426ce5c00ac83d453e4cfc9d81549efc..ab0d3833c825899c44e53b0415095f1c854e02e4 100644 (file)
@@ -2062,6 +2062,7 @@ static void io_req_task_queue(struct io_kiocb *req)
 
 static void io_req_task_queue_reissue(struct io_kiocb *req)
 {
+       req->rw.kiocb.ki_flags &= ~IOCB_ALLOC_CACHE;
        req->io_task_work.func = io_queue_async_work;
        io_req_task_work_add(req);
 }
@@ -2715,7 +2716,7 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe)
                    !kiocb->ki_filp->f_op->iopoll)
                        return -EOPNOTSUPP;
 
-               kiocb->ki_flags |= IOCB_HIPRI;
+               kiocb->ki_flags |= IOCB_HIPRI | IOCB_ALLOC_CACHE;
                kiocb->ki_complete = io_complete_rw_iopoll;
                req->iopoll_completed = 0;
        } else {