On 11/6/24 5:26 AM, Ming Lei wrote: > @@ -670,6 +689,14 @@ struct io_kiocb { > struct io_buffer_list *buf_list; > > struct io_rsrc_node *buf_node; > + > + /* valid IFF REQ_F_GROUP_BUF is set */ > + union { > + /* store group buffer for group leader */ > + const struct io_mapped_buf *grp_buf; > + /* for group member */ > + bool grp_buf_imported; > + }; > }; Just add a REQ_F flag for this. > +/* For group member only */ > +static inline void io_req_mark_group_buf(struct io_kiocb *req, bool imported) > +{ > + req->grp_buf_imported = imported; > +} > + > +/* For group member only */ > +static inline bool io_req_group_buf_imported(struct io_kiocb *req) > +{ > + return req->grp_buf_imported; > +} And kill these useless helpers, should just set or clear the above mentioned REQ_F flag instead. -- Jens Axboe