From: Ming Lei <[email protected]>
To: Jens Axboe <[email protected]>,
[email protected], Pavel Begunkov <[email protected]>
Cc: [email protected],
Uday Shankar <[email protected]>,
Akilesh Kailash <[email protected]>,
Ming Lei <[email protected]>
Subject: [PATCH V9 1/7] io_uring: rename io_mapped_ubuf as io_mapped_buf
Date: Wed, 6 Nov 2024 20:26:50 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Rename io_mapped_ubuf so that the same structure can be used for
describing kernel buffer.
Signed-off-by: Ming Lei <[email protected]>
---
io_uring/fdinfo.c | 2 +-
io_uring/rsrc.c | 10 +++++-----
io_uring/rsrc.h | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index b214e5a407b5..9ca95f877312 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -218,7 +218,7 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
}
seq_printf(m, "UserBufs:\t%u\n", ctx->buf_table.nr);
for (i = 0; has_lock && i < ctx->buf_table.nr; i++) {
- struct io_mapped_ubuf *buf = NULL;
+ struct io_mapped_buf *buf = NULL;
if (ctx->buf_table.nodes[i])
buf = ctx->buf_table.nodes[i]->buf;
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 2fb1791d7255..70dba4a4de1d 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -106,7 +106,7 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
unsigned int i;
if (node->buf) {
- struct io_mapped_ubuf *imu = node->buf;
+ struct io_mapped_buf *imu = node->buf;
if (!refcount_dec_and_test(&imu->refs))
return;
@@ -580,7 +580,7 @@ static bool headpage_already_acct(struct io_ring_ctx *ctx, struct page **pages,
/* check previously registered pages */
for (i = 0; i < ctx->buf_table.nr; i++) {
struct io_rsrc_node *node = ctx->buf_table.nodes[i];
- struct io_mapped_ubuf *imu;
+ struct io_mapped_buf *imu;
if (!node)
continue;
@@ -597,7 +597,7 @@ static bool headpage_already_acct(struct io_ring_ctx *ctx, struct page **pages,
}
static int io_buffer_account_pin(struct io_ring_ctx *ctx, struct page **pages,
- int nr_pages, struct io_mapped_ubuf *imu,
+ int nr_pages, struct io_mapped_buf *imu,
struct page **last_hpage)
{
int i, ret;
@@ -724,7 +724,7 @@ static struct io_rsrc_node *io_sqe_buffer_register(struct io_ring_ctx *ctx,
struct iovec *iov,
struct page **last_hpage)
{
- struct io_mapped_ubuf *imu = NULL;
+ struct io_mapped_buf *imu = NULL;
struct page **pages = NULL;
struct io_rsrc_node *node;
unsigned long off;
@@ -866,7 +866,7 @@ int io_sqe_buffers_register(struct io_ring_ctx *ctx, void __user *arg,
}
int io_import_fixed(int ddir, struct iov_iter *iter,
- struct io_mapped_ubuf *imu,
+ struct io_mapped_buf *imu,
u64 buf_addr, size_t len)
{
u64 buf_end;
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h
index bc3a863b14bb..9d55f9769c77 100644
--- a/io_uring/rsrc.h
+++ b/io_uring/rsrc.h
@@ -22,11 +22,11 @@ struct io_rsrc_node {
u64 tag;
union {
unsigned long file_ptr;
- struct io_mapped_ubuf *buf;
+ struct io_mapped_buf *buf;
};
};
-struct io_mapped_ubuf {
+struct io_mapped_buf {
u64 ubuf;
unsigned int len;
unsigned int nr_bvecs;
@@ -50,7 +50,7 @@ void io_rsrc_data_free(struct io_rsrc_data *data);
int io_rsrc_data_alloc(struct io_rsrc_data *data, unsigned nr);
int io_import_fixed(int ddir, struct iov_iter *iter,
- struct io_mapped_ubuf *imu,
+ struct io_mapped_buf *imu,
u64 buf_addr, size_t len);
int io_register_clone_buffers(struct io_ring_ctx *ctx, void __user *arg);
--
2.47.0
next prev parent reply other threads:[~2024-11-06 12:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 12:26 [PATCH V9 0/7] io_uring: support group buffer & ublk zc Ming Lei
2024-11-06 12:26 ` Ming Lei [this message]
2024-11-06 12:26 ` [PATCH V9 2/7] io_uring: rename ubuf of io_mapped_buf as start Ming Lei
2024-11-06 15:07 ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 3/7] io_uring: shrink io_mapped_buf Ming Lei
2024-11-06 15:09 ` Jens Axboe
2024-11-07 1:04 ` Ming Lei
2024-11-07 2:13 ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 4/7] io_uring: reuse io_mapped_buf for kernel buffer Ming Lei
2024-11-06 15:15 ` Jens Axboe
2024-11-07 1:22 ` Ming Lei
2024-11-07 2:16 ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 5/7] io_uring: support leased group buffer with REQ_F_GROUP_BUF Ming Lei
2024-11-06 15:17 ` Jens Axboe
2024-11-06 12:26 ` [PATCH V9 6/7] io_uring/uring_cmd: support leasing device kernel buffer to io_uring Ming Lei
2024-11-06 12:26 ` [PATCH V9 7/7] ublk: support leasing io " Ming Lei
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[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