On 2020/8/5 上午11:28, Carter Li 李通洲 wrote: >> diff --git a/src/include/liburing.h b/src/include/liburing.h >> index 0505a4f..82c2980 100644 >> --- a/src/include/liburing.h >> +++ b/src/include/liburing.h >> @@ -56,6 +56,9 @@ struct io_uring { >> struct io_uring_sq sq; >> struct io_uring_cq cq; >> unsigned flags; >> + unsigned flags_internal; >> + unsigned features; >> + unsigned pad[4]; >> int ring_fd; >> }; > > Won't it break existing code runs on newer kernel? io_uring is a structure that used in userspace. It breaks the API with existing compiled application. So I have changed the soname to 2.0.7. And for syscall io_uring_enter(), I have added a new feature bit IORING_FEAT_GETEVENTS_TIMEOUT and io_uring_enter() flag IORING_ENTER_GETEVENTS_TIMEOUT. Here are 3 cases below: 1) old liburing <-> new kernel: old liburing can not pass the flag IORING_ENTER_GETEVENTS_TIMEOUT, so new kernel will parse the arguments the original way. 2) new liburing <-> old kernel: feature IORING_FEAT_GETEVENTS_TIMEOUT not supported, liburing will do things like before. 3) new liburing <-> new kernel: feature IORING_FEAT_GETEVENTS_TIMEOUT supported, liburing pass the new arguments with the flag IORING_ENTER_GETEVENTS_TIMEOUT which helps kernel parse the arguments correctly. Thanks, Jiufei. > Won't it break code compiled with new liburing but runs on older kernel? > > IMO In this case, a new syscall `io_uring_setup2` is required at least. > > Regards, > Carter >