Message ID | 20250204194814.393112-9-axboe@kernel.dk (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | io_uring epoll wait support | expand |
On 2/4/25 19:46, Jens Axboe wrote: > Use the same value as the retry, doesn't need to be unique, just > available if the poll owning mechanism user wishes to use it for > something other than a retry condition. > > Signed-off-by: Jens Axboe <axboe@kernel.dk> > --- > io_uring/poll.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/io_uring/poll.h b/io_uring/poll.h > index 2f416cd3be13..97d14b2b2751 100644 > --- a/io_uring/poll.h > +++ b/io_uring/poll.h > @@ -23,6 +23,7 @@ struct async_poll { > > #define IO_POLL_CANCEL_FLAG BIT(31) > #define IO_POLL_RETRY_FLAG BIT(30) > +#define IO_POLL_FINISH_FLAG IO_POLL_RETRY_FLAG The patches use io_poll_get_ownership(), which already might set the flag and with a different meaning put into it. > #define IO_POLL_REF_MASK GENMASK(29, 0) > > bool io_poll_get_ownership_slowpath(struct io_kiocb *req);
On 2/7/25 5:15 AM, Pavel Begunkov wrote: > On 2/4/25 19:46, Jens Axboe wrote: >> Use the same value as the retry, doesn't need to be unique, just >> available if the poll owning mechanism user wishes to use it for >> something other than a retry condition. >> >> Signed-off-by: Jens Axboe <axboe@kernel.dk> >> --- >> io_uring/poll.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/io_uring/poll.h b/io_uring/poll.h >> index 2f416cd3be13..97d14b2b2751 100644 >> --- a/io_uring/poll.h >> +++ b/io_uring/poll.h >> @@ -23,6 +23,7 @@ struct async_poll { >> #define IO_POLL_CANCEL_FLAG BIT(31) >> #define IO_POLL_RETRY_FLAG BIT(30) >> +#define IO_POLL_FINISH_FLAG IO_POLL_RETRY_FLAG > > The patches use io_poll_get_ownership(), which already might set > the flag and with a different meaning put into it. Oh true, I totally missed that. I'll just add another flag for it instead and shrink the ref mask.
diff --git a/io_uring/poll.h b/io_uring/poll.h index 2f416cd3be13..97d14b2b2751 100644 --- a/io_uring/poll.h +++ b/io_uring/poll.h @@ -23,6 +23,7 @@ struct async_poll { #define IO_POLL_CANCEL_FLAG BIT(31) #define IO_POLL_RETRY_FLAG BIT(30) +#define IO_POLL_FINISH_FLAG IO_POLL_RETRY_FLAG #define IO_POLL_REF_MASK GENMASK(29, 0) bool io_poll_get_ownership_slowpath(struct io_kiocb *req);
Use the same value as the retry, doesn't need to be unique, just available if the poll owning mechanism user wishes to use it for something other than a retry condition. Signed-off-by: Jens Axboe <axboe@kernel.dk> --- io_uring/poll.h | 1 + 1 file changed, 1 insertion(+)