public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, io-uring <[email protected]>
Subject: [RFC] fixed files
Date: Sat, 8 Feb 2020 16:28:59 +0300	[thread overview]
Message-ID: <[email protected]> (raw)

Hi,

As you remember, splice(2) needs two fds, and it's a bit of a pain
finding a place for the second REQ_F_FIXED_FILE flag. So, I was
thinking, can we use the last (i.e. sign) bit to mark an fd as fixed? A
lot of userspace programs consider any negative result of open() as an
error, so it's more or less safe to reuse it.

e.g.
fill_sqe(fd) // is not fixed
fill_sqe(buf_idx | LAST_BIT) // fixed file


-- 
Pavel Begunkov

             reply	other threads:[~2020-02-08 13:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08 13:28 Pavel Begunkov [this message]
2020-02-08 20:15 ` [RFC] fixed files Jens Axboe
2020-02-09 12:18   ` Pavel Begunkov
2020-02-09 17:04     ` Jens Axboe
2020-02-09 17:53       ` Pavel Begunkov

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] \
    /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