From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>,
[email protected], Ammar Faizi <[email protected]>
Subject: [PATCH liburing v2 5/5] liburing: improve fallocate typecasting
Date: Mon, 25 Jul 2022 12:33:22 +0100 [thread overview]
Message-ID: <bbcd93f438c60073bb06ae7ab02f6ebd770ecdcb.1658748624.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Don't double cast int -> ptr -> int in io_uring_prep_fallocate(), assign
len directly.
Signed-off-by: Pavel Begunkov <[email protected]>
---
src/include/liburing.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 20cd308..cffdabd 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -601,10 +601,9 @@ static inline void io_uring_prep_files_update(struct io_uring_sqe *sqe,
static inline void io_uring_prep_fallocate(struct io_uring_sqe *sqe, int fd,
int mode, off_t offset, off_t len)
{
-
io_uring_prep_rw(IORING_OP_FALLOCATE, sqe, fd,
- (const uintptr_t *) (unsigned long) len,
- (unsigned int) mode, (__u64) offset);
+ 0, (unsigned int) mode, (__u64) offset);
+ sqe->addr = (__u64) len;
}
static inline void io_uring_prep_openat(struct io_uring_sqe *sqe, int dfd,
--
2.37.0
next prev parent reply other threads:[~2022-07-25 11:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 11:33 [PATCH liburing v2 0/5] zerocopy send headers and tests Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 1/5] io_uring.h: sync with kernel for zc send and notifiers Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 2/5] liburing: add zc send and notif helpers Pavel Begunkov
2022-07-25 12:35 ` Ammar Faizi
2022-07-25 11:33 ` [PATCH liburing v2 3/5] tests: add tests for zerocopy send and notifications Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 4/5] examples: add a zerocopy send example Pavel Begunkov
2022-07-25 11:33 ` Pavel Begunkov [this message]
2022-07-25 12:21 ` [PATCH liburing v2 5/5] liburing: improve fallocate typecasting Ammar Faizi
2022-07-25 12:17 ` [PATCH liburing v2 0/5] zerocopy send headers and tests Ammar Faizi
2022-07-25 15:48 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bbcd93f438c60073bb06ae7ab02f6ebd770ecdcb.1658748624.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox