From: [email protected]
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: [WIP PATCH] io_uring: Support opening a file into the fixed-file table
Date: Wed, 15 Jul 2020 14:04:01 -0700 [thread overview]
Message-ID: <20200715210401.GA351229@localhost> (raw)
In-Reply-To: <[email protected]>
Clay Harris wrote:
> On Tue, Jul 14 2020 at 14:08:26 -0700, Josh Triplett quoth thus:
> > The other next step would be to add an IORING_OP_CLOSE_FIXED_FILE
> > (separate from the existing CLOSE op) that removes an entry currently in
> > the fixed file table and calls fput on it. (With some care, that
> > *should* be possible even for an entry that was originally registered
> > from a file descriptor.)
>
> I'm curious why you wouldn't use IOSQE_FIXED_FILE here. I understand
> your reasoning for OPEN_FIXED_FILE, but using the flag with the existing
> CLOSE OP seems like a perfect fit. To me, this looks like a suboptimal
> precedent that would result in defining a new opcode for every request
> which could accept either a fixed file or process descriptor.
We absolutely could use IORING_OP_CLOSE with IOSQE_FIXED_FILE as the
userspace interface. It would take a bit of refactoring to make that
work, since unlike other cases of IOSQE_FIXED_FILE we don't just want a
struct file in both cases and instead we need the file descriptor (to
close it) in the non-fixed-file case, but I agree that that would make
sense as the userspace interface.
next prev parent reply other threads:[~2020-07-15 21:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 21:08 [WIP PATCH] io_uring: Support opening a file into the fixed-file table Josh Triplett
2020-07-14 21:16 ` [WIP PATCH] liburing: Support IORING_OP_OPENAT2_FIXED_FILE Josh Triplett
2020-07-14 22:59 ` [WIP PATCH] io_uring: Support opening a file into the fixed-file table Clay Harris
2020-07-15 0:42 ` Josh Triplett
2020-07-15 2:32 ` Clay Harris
2020-07-15 21:04 ` josh [this message]
2020-07-15 16:07 ` Jens Axboe
2020-07-15 19:54 ` Pavel Begunkov
2020-07-15 20:46 ` Josh Triplett
2020-07-15 20:54 ` 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=20200715210401.GA351229@localhost \
[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