History

io_uring/rsrc: allow cloning with node replacements

Currently cloning a buffer table will fail if the destination already has a table. But it should be possible to use it to replace existing elements. Add a IORING_REGISTER_DST_REPLACE cloning flag, which if set, will allow the destination to already having a buffer table. If that is the case, then entries designated by offset + nr buffers will be replaced if they already exist. Note that it's allowed to use IORING_REGISTER_DST_REPLACE and not have an existing table, in which case it'll work just like not having the flag set and an empty table - it'll just assign the newly created table for that case.

Jens Axboe committed 2 years ago

Commit c1329531 parent b16e9202 files · +54 −15Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+2−1
@@ -713,7 +713,8 @@ struct io_uring_clock_register { · 712 unmodified lines
713};713};
714 714
715enum {715enum {
716 IORING_REGISTER_SRC_REGISTERED = 1,716 IORING_REGISTER_SRC_REGISTERED = (1U << 0),
717 IORING_REGISTER_DST_REPLACE = (1U << 1),
717};718};
718 719
719struct io_uring_clone_buffers {720struct io_uring_clone_buffers {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t