io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] fixed files
@ 2020-02-08 13:28 Pavel Begunkov
  2020-02-08 20:15 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Begunkov @ 2020-02-08 13:28 UTC (permalink / raw)
  To: Jens Axboe, io-uring

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-09 17:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 13:28 [RFC] fixed files Pavel Begunkov
2020-02-08 20:15 ` Jens Axboe
2020-02-09 12:18   ` Pavel Begunkov
2020-02-09 17:04     ` Jens Axboe
2020-02-09 17:53       ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).