[PATCH v10 06/10] io_uring: introduce attributes for read/write and PI support
Pavel Begunkov
asml.silence at gmail.com
Wed Nov 27 02:35:46 PST 2024
On 11/26/24 16:23, Anuj gupta wrote:
> On Tue, Nov 26, 2024 at 9:14 PM Pavel Begunkov <asml.silence at gmail.com> wrote:
...
>> This example would be incorrect. Even if it's just one attribute
>> the user would be wasting space on stack. The only use for it I
>> see is having ephemeral pointers during parsing, ala
>>
>> void parse(voud *attributes, offset) {
>> struct io_uring_attr *attr = attributes + offset;
>>
>> if (attr->type == PI) {
>> process_pi(&attr->pi);
>> // or potentially fill_pi() in userspace
>> }
>> }
>>
>> But I don't think it's worth it. I'd say, if you're leaving
>> the structure, let's rename it to struct io_uring_attr_type_pi
>> or something similar. We can always add a new one later, it
>> doesn't change the ABI.
>>
>
> In that case I can just drop the io_uring_attr_pi structure then. We can
> keep the mask version where we won't need the type and attributes would go
> in the array in order of their types as you suggested here [1]. Does that
> sound fine?
That should work, the approach in this patchset is fine as well.
I'll take a look at the path a bit later today.
> [1] https://lore.kernel.org/io-uring/37ba07f6-27a5-45bc-86c4-df9c63908ef9@gmail.com/
--
Pavel Begunkov
More information about the Linux-nvme
mailing list