All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Christian Brauner" <brauner@kernel.org>,
	"Méven Car" <meven29@gmail.com>
Cc: io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Jan Kara" <jack@suse.cz>, "Méven Car" <meven@kde.org>
Subject: Re: [RFC PATCH v3 0/2] io_uring: add IORING_OP_UTIMENSAT
Date: Fri, 20 Nov 2026 09:34:28 -0700	[thread overview]
Message-ID: <0460f99b-ab87-46f3-ba58-2daba2e821db@kernel.dk> (raw)
In-Reply-To: <20261120-vorfeld-formlos-nahbereich-00aebc4c5150@brauner>

On 11/20/26 3:33 AM, Christian Brauner wrote:
> On Sat, Nov 14, 2026 at 11:46:19AM +0100, M?ven Car wrote:
>> IORING_OP_FCHMOD was proposed in 2024 [1] and not merged. The same
>> questions apply to fchmod and fchown, which a copy also needs, and a
>> single setattr opcode could set the mode, owner and times in one
>> ->setattr() call. I started with the times because a copy always sets
>> them.
> 
> To me it seems strange to grow an io_uring opcode per attribute. What
> makes the most sense to me is a common interface to set multiple
> attributes in one shot that is shared between io_uring and the regular
> system call path. IOW, an extensible struct based system call that takes
> the mode, owner and times and does a single ->setattr() and an io_uring
> opcode that uses the same struct. Then a copy sets everything at once
> and userspace that doesn't use io_uring gets the same thing and it would
> reduce the number of system calls for userspace and less work for
> io_uring as well.
> 
> The other thing that this would allow is for filesystems to implement
> multi-attribute changes in one transaction.

Arrays of things is usually unhandy for io_uring, eg if the idea is to
have an array of structs to deal with. It's a lot more expensive for
persisting the data, as you know need to copy a bunch of it, rather than
just have the single item which will fit in the per-sqe data for
io_uring and not require any allocations. An example are things like
sendmmsg - that kind of construct just doesn't make sense for io_uring,
as you could've just done N SQEs instead.

It also becomes problematic with the non-blocking aspect to deal with
multiples at the time, dealing with "yep first N worked, N+1 would've
blocked" which then turns into do you blocking retry the latter bits, or
do you just return N done and let the app deal with it.

With that said, I need to actually set some time aside to look at this
patchset and render an informed opinion :-)

-- 
Jens Axboe

      reply	other threads:[~2026-11-20 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 10:46 [RFC PATCH v3 0/2] io_uring: add IORING_OP_UTIMENSAT Méven Car
2026-11-14 10:46 ` [RFC PATCH v3 1/2] fs: add filename_utimensat() Méven Car
2026-11-14 10:46 ` [RFC PATCH v3 2/2] io_uring: add support for utimensat Méven Car
2026-11-20 10:33 ` [RFC PATCH v3 0/2] io_uring: add IORING_OP_UTIMENSAT Christian Brauner
2026-11-20 16:34   ` Jens Axboe [this message]

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=0460f99b-ab87-46f3-ba58-2daba2e821db@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=meven29@gmail.com \
    --cc=meven@kde.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.