Sync with upstream API

Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-01-16 08:41:05 -07:00
parent f16b83b293
commit b93edf5b9e
4 changed files with 7 additions and 25 deletions

View File

@@ -20,10 +20,7 @@ struct io_uring_sqe {
__u16 ioprio; /* ioprio for the request */
__s32 fd; /* file descriptor to do IO on */
__u64 off; /* offset into file */
union {
void *addr; /* buffer or iovecs */
__u64 __pad;
};
__u64 addr; /* pointer to buffer or iovecs */
__u32 len; /* buffer size or number of iovecs */
union {
__kernel_rwf_t rw_flags;
@@ -136,20 +133,4 @@ struct io_uring_params {
#define IORING_REGISTER_FILES 2
#define IORING_UNREGISTER_FILES 3
struct io_uring_register_buffers {
union {
struct iovec *iovecs;
__u64 pad;
};
__u32 nr_iovecs;
};
struct io_uring_register_files {
union {
__s32 *fds;
__u64 pad;
};
__u32 nr_fds;
};
#endif

View File

@@ -31,9 +31,10 @@
#error "Arch not supported yet"
#endif
int io_uring_register(int fd, unsigned int opcode, void *arg)
int io_uring_register(int fd, unsigned int opcode, void *arg,
unsigned int nr_args)
{
return syscall(__NR_sys_io_uring_register, fd, opcode, arg);
return syscall(__NR_sys_io_uring_register, fd, opcode, arg, nr_args);
}
int io_uring_setup(unsigned int entries, struct io_uring_params *p)