From: Joanne Koong <joannelkoong@gmail.com>
To: axboe@kernel.dk
Cc: csander@purestorage.com, asml.silence@gmail.com,
io-uring@vger.kernel.org
Subject: Re: [PATCH v2 3/5] io_uring/rsrc: allow buffer release callback to be optional
Date: Tue, 24 Mar 2026 15:05:16 -0700 [thread overview]
Message-ID: <CAJnrk1aCevas2+r63hzwr67_phEfZC=TKE-n8ARbUsm9Wx71dA@mail.gmail.com> (raw)
In-Reply-To: <20260324182157.990864-4-joannelkoong@gmail.com>
On Tue, Mar 24, 2026 at 11:22 AM Joanne Koong <joannelkoong@gmail.com> wrote:
>
> This is a preparatory patch for supporting kernel-populated buffers in
> fuse io-uring, which does not need a release callback.
>
> Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
> Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
> ---
> io_uring/rsrc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
> index 01c3619e5f07..73ee03f85509 100644
> --- a/io_uring/rsrc.c
> +++ b/io_uring/rsrc.c
> @@ -133,7 +133,8 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_mapped_ubuf *imu)
>
> if (imu->acct_pages)
> io_unaccount_mem(ctx->user, ctx->mm_account, imu->acct_pages);
> - imu->release(imu->priv);
> + if (imu->release)
> + imu->release(imu->priv);
> io_free_imu(ctx, imu);
> }
I'm going to drop this patch. While going over the fuse side of
things, I realized there's the possibiltiy of spontaneous unmounts
(which even with privileged servers can happen while non-fuse io-uring
requests are inflight). fuse will need to grab and release refcounts
on the underlying pages.
I'll submit a new v3 with this change (and with an added patch that
exports IO_IMU_DEST/IO_IMU_SOURCE), sorry for the noise. The fuse
changes that depend on this series will be submitted shortly
thereafter.
Thanks,
Joanne
>
> --
> 2.52.0
>
next prev parent reply other threads:[~2026-03-24 22:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 18:21 [PATCH v2 0/5] io_uring: extend bvec registration and add mem region lookup Joanne Koong
2026-03-24 18:21 ` [PATCH v2 1/5] io_uring/rsrc: rename io_buffer_register_bvec()/io_buffer_unregister_bvec() Joanne Koong
2026-03-24 18:21 ` [PATCH v2 2/5] io_uring/rsrc: split io_buffer_register_request() logic Joanne Koong
2026-03-24 18:21 ` [PATCH v2 3/5] io_uring/rsrc: allow buffer release callback to be optional Joanne Koong
2026-03-24 22:05 ` Joanne Koong [this message]
2026-03-24 18:21 ` [PATCH v2 4/5] io_uring/rsrc: add io_buffer_register_bvec() Joanne Koong
2026-03-24 18:21 ` [PATCH v2 5/5] io_uring/rsrc: add io_uring_registered_mem_region_get() Joanne Koong
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='CAJnrk1aCevas2+r63hzwr67_phEfZC=TKE-n8ARbUsm9Wx71dA@mail.gmail.com' \
--to=joannelkoong@gmail.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=io-uring@vger.kernel.org \
/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