Re: [PATCH v1] io_uring_cqe_get_data() only requires a const struct io_uring_cqe *cqe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 06.02.20 um 17:04 schrieb Jens Axboe:
> On 2/6/20 9:02 AM, Stefan Metzmacher wrote:
>> Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx>
>> ---
>>  src/include/liburing.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/include/liburing.h b/src/include/liburing.h
>> index faed2e7..44f18fd 100644
>> --- a/src/include/liburing.h
>> +++ b/src/include/liburing.h
>> @@ -179,7 +179,7 @@ static inline void io_uring_sqe_set_data(struct io_uring_sqe *sqe, void *data)
>>  	sqe->user_data = (unsigned long) data;
>>  }
>>  
>> -static inline void *io_uring_cqe_get_data(struct io_uring_cqe *cqe)
>> +static inline void *io_uring_cqe_get_data(const struct io_uring_cqe *cqe)
>>  {
>>  	return (void *) (uintptr_t) cqe->user_data;
>>  }
> 
> Applied, thanks.

Thanks!

> Unrelated to this patch, but I'd like to release a 0.4 sooner rather
> than later.

Funny, I thought about that today:-)
I prepared debian packaging for liburing-0.4 I'll send the patches soon.

While doing that I found the following incompatible change against
liburing-0.3:

 static inline void io_uring_prep_files_update(struct io_uring_sqe *sqe,
-                                             int *fds, unsigned nr_fds)
+                                             int *fds, unsigned nr_fds,
+                                             int offset)

I'm not sure if we should do something about that.

It's also strange that in src/liburing.map LIBURING_0.3 doesn't
inherit LIBURING_0.2. There's not a single symbol with @LIBURING_0.3.
Also io_uring_{setup,enter,register} are still
listed under LIBURING_0.1, but they're not in the library anymore.

> Let me know if you see any immediate work that needs doing
> before that happens.

I had the idea to have a simple version of fd compounding.
We already have IORING_OP_FILES_UPDATE in order to update
specific indexes in the files array.
I'm wondering if we could have specify an index where
IORING_OP_ACCEPT, IORING_OP_OPENAT and IORING_OP_OPENAT2
could store the generated fd into the fixed array.
The index 0 is not valid, correct? So we can have it
without a flag similar to the personality, and for
all of these buf_index is not used.

While researching that I noticed that IOSQE_FIXED_FILE
seems to be ignored for some new commands, I think that
all commands with on input fd, should be able to use that flag.
Can this be fixed before 5.6 final?

metze

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux