diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-12-22 19:55:20 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-12-22 19:55:20 -0700 |
commit | 8ecd3fd959634df81d66af8b3a69c16202a014e8 (patch) | |
tree | 8465ea9ed93787613c46e87c588605a286840803 | |
parent | 7233a8753cb7a4a137cdc5e534bb31fb2a0d53fd (diff) | |
download | liburing-8ecd3fd959634df81d66af8b3a69c16202a014e8.tar.gz liburing-8ecd3fd959634df81d66af8b3a69c16202a014e8.tar.bz2 |
Don't clear sqe->user_data as part of command prep
Reasoning:
1) If the app doesn't set it, it should not be reading it.
2) I've gotten more than one report on someone setting user_data
before calling io_uring_prep_cmdtype() and it's a bit confusing.
I think we'll be fine not clearing this, and it may actually help
some cases that end up being a bit confusing, particular for people
new to the interface.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | src/include/liburing.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h index c334d04..b2683c1 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -280,7 +280,6 @@ static inline void io_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd, sqe->addr = (unsigned long) addr; sqe->len = len; sqe->rw_flags = 0; - sqe->user_data = 0; sqe->buf_index = 0; sqe->personality = 0; sqe->file_index = 0; |