On 10/14/21 2:03 AM, Christoph Hellwig wrote: > On Wed, Oct 13, 2021 at 10:54:15AM -0600, Jens Axboe wrote: >> @@ -2404,6 +2406,11 @@ static int io_do_iopoll(struct io_ring_ctx *ctx, bool force_nonspin) >> struct kiocb *kiocb = &req->rw.kiocb; >> int ret; >> >> + if (!file) >> + file = kiocb->ki_filp; >> + else if (file != kiocb->ki_filp) >> + break; >> + > > Can you explain why we now can only poll for a single file (independent > of the fact that batching is used)? Different file may be on a different backend, it's just playing it safe and splitting it up. In practice it should not matter. >> + if (!pos && !iob.req_list) >> return 0; >> + if (iob.req_list) >> + iob.complete(&iob); > > Why not: > > if (iob.req_list) > iob.complete(&iob); > else if (!pos) > return 0; That is cleaner, will adapt. Thanks! -- Jens Axboe