summaryrefslogtreecommitdiffstats
path: root/io_uring/filetable.c
Commit message (Collapse)AuthorAgeFilesLines
* io_uring: let to set a range for file slot allocationPavel Begunkov2022-07-241-4/+20
| | | | | | | | | | | | | | | | | From recently io_uring provides an option to allocate a file index for operation registering fixed files. However, it's utterly unusable with mixed approaches when for a part of files the userspace knows better where to place it, as it may race and users don't have any sane way to pick a slot and hoping it will not be taken. Let the userspace to register a range of fixed file slots in which the auto-allocation happens. The use case is splittting the fixed table in two parts, where on of them is used for auto-allocation and another for slot-specified operations. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/66ab0394e436f38437cf7c44676e1920d09687ad.1656154403.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
* io_uring: split out fixed file installation and removalJens Axboe2022-07-241-15/+51
| | | | | | | | | Put it with the filetable code, which is where it belongs. While doing so, have the helpers take a ctx rather than an io_kiocb. It doesn't make sense to use a request, as it's not an operation on the request itself. It applies to the ring itself. Signed-off-by: Jens Axboe <axboe@kernel.dk>
* io_uring: kill extra io_uring_types.h includesPavel Begunkov2022-07-241-1/+0
| | | | | | | | | | io_uring/io_uring.h already includes io_uring_types.h, no need to include it every time. Kill it in a bunch of places, it prepares us for following patches. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/94d8c943fbe0ef949981c508ddcee7fc1c18850f.1655384063.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
* io_uring: move remaining file table manipulation to filetable.cJens Axboe2022-07-241-1/+86
| | | | Signed-off-by: Jens Axboe <axboe@kernel.dk>
* io_uring: separate out file table handling codeJens Axboe2022-07-241-0/+57
Signed-off-by: Jens Axboe <axboe@kernel.dk>