On Tue, Dec 05, 2023 at 03:00:52PM -0700, Jens Axboe wrote: > > if (!file->f_op->uring_cmd_iopoll) > > return -EOPNOTSUPP; > > - issue_flags |= IO_URING_F_IOPOLL; > > req->iopoll_completed = 0; > > } > > > > + issue_flags |= ctx->issue_flags; > > ret = file->f_op->uring_cmd(ioucmd, issue_flags); > > if (ret == -EAGAIN) { > > if (!req_has_async_data(req)) { > > I obviously like this idea, but it should be accompanied by getting rid > of ->compat and ->syscall_iopoll in the ctx as well? Yeah, I considered that, and can incorporate it here. Below is a snippet of what I had earlier to make that happen, but felt the purpose for the "issue_flags" was uring_cmd specific and disconnected from everyone else. Maybe I'm overthinking it... diff --git a/io_uring/net.c b/io_uring/net.c index 75d494dad7e2c..c11313e77495c 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -549,7 +549,7 @@ static int io_recvmsg_copy_hdr(struct io_kiocb *req, iomsg->msg.msg_iter.nr_segs = 0; #ifdef CONFIG_COMPAT - if (req->ctx->compat) + if (req->ctx->issue_flags & IO_URING_F_COMPAT) return __io_compat_recvmsg_copy_hdr(req, iomsg); #endif