commits
Fix mkdir test
According to `man 7 inode`:
> POSIX refers to the stat.st_mode bits corresponding to the mask S_IFMT
> (see below) as the file type, the 12 bits corresponding to the mask
> 07777 as the file mode bits and the least significant 9 bits (0777) as
> the file permission bits.
OCaml defines `st_perm` as:
> The type of file access rights, e.g. 0o640 is read and write for user,
> read for group, none for others
However, OCaml uses `buf->st_mode & 07777` and so includes three other
bits. We need to mask them out for the test.
prepare v2.7.0 release, improve docstrings
fix use after seen in cqe handlers
Add support for the IORING_OP_BIND and IORING_OP_LISTEN operations
- Socket operations: BIND, LISTEN
- Multishot read: READ_MULTISHOT
- Process operations: WAITID, FTRUNCATE
- Futex operations: FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAITV
- File descriptor operations: FIXED_FD_INSTALL
Add new setup flags:
- IORING_SETUP_NO_MMAP: Don't mmap the rings
- IORING_SETUP_REGISTERED_FD_ONLY: Only use registered file descriptors
- IORING_SETUP_NO_SQARRAY: Don't allocate an SQ array
Clean up configurator code and update primitives.h
This is useful to know whether we need to call `submit`. Knowing we
don't avoids the need to report trace events for it.
Fix statx constant fallback values, and fix with musl 1.2.5
musl 1.2.5 includes a <sys/stat.h> that doesn't define any of these.
These were previously all defined as 0, rather than their actual
values.
add Uring.fsync and Uring.fdatasync ops
Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
Co-authored-by: Thomas Leonard <talex5@gmail.com>
Note: the flags don't currently work due to a Linux bug, so that test is
disabled for now: https://github.com/axboe/liburing/issues/955
Review from @talex5 and @patricoferris
Use lintcstubs to generate C prototypes and fix bugs
Registering an eventfd to the io_uring is useful for interfacing
with systems that already use polling.
Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
add filesystem attributes display to urstat
Was failing sometimes with e.g.
/usr/bin/ld: cannot find queue.os: No such file or directory
/usr/bin/ld: cannot find register.os: No such file or directory
Converting to float loses some accuracy.
Co-authored-by: Thomas Leonard <talex5@gmail.com>
Update liburing to 2.4
Fix accidental shadowing in ocaml_uring_get_msghdr_fds
It declared `v_cons` as a GC root, but then shadowed it by mistake:
CAMLlocal2(v_list, v_cons);
...
value v_cons = caml_alloc_tuple(2);
Can cause memory corruption when receiving FDs over a Unix-domain
socket.
According to `man 7 inode`:
> POSIX refers to the stat.st_mode bits corresponding to the mask S_IFMT
> (see below) as the file type, the 12 bits corresponding to the mask
> 07777 as the file mode bits and the least significant 9 bits (0777) as
> the file permission bits.
OCaml defines `st_perm` as:
> The type of file access rights, e.g. 0o640 is read and write for user,
> read for group, none for others
However, OCaml uses `buf->st_mode & 07777` and so includes three other
bits. We need to mask them out for the test.
- Socket operations: BIND, LISTEN
- Multishot read: READ_MULTISHOT
- Process operations: WAITID, FTRUNCATE
- Futex operations: FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAITV
- File descriptor operations: FIXED_FD_INSTALL
Add new setup flags:
- IORING_SETUP_NO_MMAP: Don't mmap the rings
- IORING_SETUP_REGISTERED_FD_ONLY: Only use registered file descriptors
- IORING_SETUP_NO_SQARRAY: Don't allocate an SQ array