On Mon, Jan 16, 2023 at 09:01:37AM -0700, Jens Axboe wrote: > This depends on: 613b14884b85 ("block: handle bio_split_to_limits() NULL return") Can we sort the NUL vs ERR_PTR thing there first? > + /* > + * We're doing more than a bio worth of IO (> 256 pages), and we > + * cannot guarantee that one of the sub bios will not fail getting > + * issued FOR NOWAIT as error results are coalesced across all of > + * them. Be safe and ask for a retry of this from blocking context. > + */ > + if (iocb->ki_flags & IOCB_NOWAIT) > + return -EAGAIN; > return __blkdev_direct_IO(iocb, iter, bio_max_segs(nr_pages)); If the I/O is too a huge page we could easily end up with a single bio here.