All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Bertschinger" <tahbertschinger@gmail.com>
To: "Jens Axboe" <axboe@kernel.dk>, <io-uring@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>, <viro@zeniv.linux.org.uk>,
	<brauner@kernel.org>, <linux-nfs@vger.kernel.org>,
	<amir73il@gmail.com>
Subject: Re: [PATCHSET RFC 0/6] add support for name_to, open_by_handle_at(2) to io_uring
Date: Tue, 19 Aug 2025 21:01:58 -0600	[thread overview]
Message-ID: <DC6X58YNOC3F.BPB6J0245QTL@gmail.com> (raw)
In-Reply-To: <e914d653-a1b6-477d-8afa-0680a703d68f@kernel.dk>

On Tue Aug 19, 2025 at 9:11 AM MDT, Jens Axboe wrote:
> I'll take a look at this, but wanted to mention that I dabbled in this
> too a while ago, here's what I had:
>
> https://git.kernel.dk/cgit/linux/log/?h=io_uring-handle

Thanks! That is helpful. Right away I see something you included that I
missed: requiring CONFIG_FHANDLE. Missing that would explain the build
failure emails I got on this series.

I'll include that in v2, when I get around to that--hopefully soon.

>
> Probably pretty incomplete, but I did try and handle some of the
> cases that won't block to avoid spurious -EAGAIN and io-wq usage.

So for the non-blocking case, what I am concerned about is code paths
like this:

do_handle_to_path()
  -> exportfs_decode_fh_raw()
    -> fh_to_dentry()
      -> xfs_fs_fh_to_dentry()
        ... -> xfs_iget()
      OR
      -> ext4_fh_to_dentry()
        ... -> ext4_iget()

Where there doesn't seem to be any existing way to tell the FS
implementation to give up and return -EAGAIN when appropriate. I wasn't
sure how to do that without modifying the signature of fh_to_dentry()
(and fh_to_parent()) which seems awfully invasive for this.

(Using a flag in task_struct to signify "don't block" was previously
discussed:
https://lore.kernel.org/io-uring/22630618-40fc-5668-078d-6cefcb2e4962@kernel.dk/
and that could allow not needing to pass a flag via function argument,
but I agree with the conclusion in that email chain that it's an ugly
solution.)

Any thoughts on that? This seemed to me like there wasn't an obvious
easy solution, hence why I just didn't attempt it at all in v1.
Maybe I'm missing something, though.

Aside from fh_to_dentry(), there is I/O that may arise from
reconnecting the dentry, as Amir pointed out earlier (like in
reconnect_one()). Handling that would, I think, be simpler because it
would only require modifying the generic code under reconnect_path() and
not each filesystem implementation.

  reply	other threads:[~2025-08-20  2:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 23:54 [PATCHSET RFC 0/6] add support for name_to, open_by_handle_at(2) to io_uring Thomas Bertschinger
2025-08-14 23:54 ` [PATCH 1/6] fhandle: create helper for name_to_handle_at(2) Thomas Bertschinger
2025-08-15 10:21   ` Amir Goldstein
2025-08-15 18:17     ` Thomas Bertschinger
2025-08-14 23:54 ` [PATCH 2/6] io_uring: add support for IORING_OP_NAME_TO_HANDLE_AT Thomas Bertschinger
2025-08-15 10:40   ` Amir Goldstein
2025-08-16  7:43   ` kernel test robot
2025-08-14 23:54 ` [PATCH 3/6] fhandle: do_handle_open() should get FD with user flags Thomas Bertschinger
2025-08-15  9:17   ` Amir Goldstein
2025-08-15 13:46     ` Christian Brauner
2025-08-15 13:51       ` Amir Goldstein
2025-08-19  9:43         ` Christian Brauner
2025-08-15 13:47   ` (subset) " Christian Brauner
2025-08-14 23:54 ` [PATCH 4/6] fhandle: create __do_handle_open() helper Thomas Bertschinger
2025-08-15 10:33   ` Amir Goldstein
2025-08-14 23:54 ` [PATCH 5/6] io_uring: add __io_open_prep() helper Thomas Bertschinger
2025-08-14 23:54 ` [PATCH 6/6] io_uring: add support for IORING_OP_OPEN_BY_HANDLE_AT Thomas Bertschinger
2025-08-16 10:10   ` kernel test robot
2025-08-15  9:52 ` [PATCHSET RFC 0/6] add support for name_to, open_by_handle_at(2) to io_uring Amir Goldstein
2025-08-15 18:24   ` Thomas Bertschinger
2025-08-19 15:11 ` Jens Axboe
2025-08-20  3:01   ` Thomas Bertschinger [this message]
2025-08-20  8:34     ` Amir Goldstein
2025-08-20 15:05       ` Thomas Bertschinger
2025-08-20 19:58         ` Amir Goldstein
2025-08-21  7:47           ` Christian Brauner

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=DC6X58YNOC3F.BPB6J0245QTL@gmail.com \
    --to=tahbertschinger@gmail.com \
    --cc=amir73il@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.