Commit Graph

28 Commits

Author SHA1 Message Date
Jeff Moyer 1f841d122f io_uring: fix io_match_task must_hold
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit e142e9cd8891b0c6f277ac2c2c254199a6aa56e3
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Jul 24 12:16:18 2024 +0100

    io_uring: fix io_match_task must_hold
    
    The __must_hold annotation in io_match_task() uses a non existing
    parameter "req", fix it.
    
    Fixes: 6af3f48bf6156 ("io_uring: fix link traversal locking")
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/3e65ee7709e96507cef3d93291746f2c489f2307.1721819383.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-12-02 11:21:29 -05:00
Jeff Moyer acf86f3693 io_uring/timeout: remove duplicate initialization of the io_timeout list.
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit 4d0f4a5413490391c6cd16407a0f71b51700a68a
Author: Ruyi Zhang <ruyi.zhang@samsung.com>
Date:   Thu Apr 11 13:59:53 2024 +0800

    io_uring/timeout: remove duplicate initialization of the io_timeout list.
    
    In the __io_timeout_prep function, the io_timeout list is initialized
    twice, removing the meaningless second initialization.
    
    Signed-off-by: Ruyi Zhang <ruyi.zhang@samsung.com>
    Link: https://lore.kernel.org/r/20240411055953.2029218-1-ruyi.zhang@samsung.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 17:26:44 -05:00
Jeff Moyer 74280b745d io_uring: refactor io_fill_cqe_req_aux
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit e5c12945be5016d681ff305ea7306fef5902219d
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Mon Mar 18 22:00:31 2024 +0000

    io_uring: refactor io_fill_cqe_req_aux
    
    The restriction on multishot execution context disallowing io-wq is
    driven by rules of io_fill_cqe_req_aux(), it should only be called in
    the master task context, either from the syscall path or in task_work.
    Since task_work now always takes the ctx lock implying
    IO_URING_F_COMPLETE_DEFER, we can just assume that the function is
    always called with its defer argument set to true.
    
    Kill the argument. Also rename the function for more consistency as
    "fill" in CQE related functions was usually meant for raw interfaces
    only copying data into the CQ without any locking, waking the user
    and other accounting "post" functions take care of.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Tested-by: Ming Lei <ming.lei@redhat.com>
    Link: https://lore.kernel.org/r/93423d106c33116c7d06bf277f651aa68b427328.1710799188.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 16:29:44 -05:00
Jeff Moyer 539a8ed2d1 io_uring: remove struct io_tw_state::locked
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit 8e5b3b89ecaf6d9295e561c225b35c574a5e0fe7
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Mon Mar 18 22:00:30 2024 +0000

    io_uring: remove struct io_tw_state::locked
    
    ctx is always locked for task_work now, so get rid of struct
    io_tw_state::locked. Note I'm stopping one step before removing
    io_tw_state altogether, which is not empty, because it still serves the
    purpose of indicating which function is a tw callback and forcing users
    not to invoke them carelessly out of a wrong context. The removal can
    always be done later.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Tested-by: Ming Lei <ming.lei@redhat.com>
    Link: https://lore.kernel.org/r/e95e1ea116d0bfa54b656076e6a977bc221392a4.1710799188.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 16:28:44 -05:00
Jeff Moyer 615948488d io_uring: never overflow io_aux_cqe
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit b6b2bb58a75407660f638a68e6e34a07036146d0
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Aug 11 13:53:45 2023 +0100

    io_uring: never overflow io_aux_cqe
    
    Now all callers of io_aux_cqe() set allow_overflow to false, remove the
    parameter and not allow overflowing auxilary multishot cqes.
    
    When CQ is full the function callers and all multishot requests in
    general are expected to complete the request. That prevents indefinite
    in-background grows of the overflow list and let's the userspace to
    handle the backlog at its own pace.
    
    Resubmitting a request should also be faster than accounting a bunch of
    overflows, so it should be better for perf when it happens, but a well
    behaving userspace should be trying to avoid overflows in any case.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/bb20d14d708ea174721e58bb53786b0521e4dd6d.1691757663.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 17:26:25 -04:00
Jeff Moyer fad2eae66b io_uring: use cancelation match helper for poll and timeout requests
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit a30badf66de8516b5a5bca7a5d339f377ff983ea
Author: Jens Axboe <axboe@kernel.dk>
Date:   Fri Jun 23 09:04:35 2023 -0600

    io_uring: use cancelation match helper for poll and timeout requests
    
    Get rid of the request vs io_cancel_data checking and just use the
    exported helper for this.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:32:14 -04:00
Jeff Moyer ea88c1aa4c io_uring/timeout: always set 'ctx' in io_cancel_data
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit faa9c0ee3cab9c68b79183c9e0111ba967d9f402
Author: Jens Axboe <axboe@kernel.dk>
Date:   Fri Jun 23 09:34:08 2023 -0600

    io_uring/timeout: always set 'ctx' in io_cancel_data
    
    In preparation for using a generic handler to match requests for
    cancelation purposes, ensure that ctx is set in io_cancel_data. The
    timeout handlers don't check for this as it'll always match, but we'll
    need it set going forward.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:32:14 -04:00
Jeff Moyer 1d2aa06cb2 io_uring: cleanup io_aux_cqe() API
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit d86eaed185e9c6052d1ee2ca538f1936ff255887
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed Jun 7 14:41:20 2023 -0600

    io_uring: cleanup io_aux_cqe() API
    
    Everybody is passing in the request, so get rid of the io_ring_ctx and
    explicit user_data pass-in. Both the ctx and user_data can be deduced
    from the request at hand.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:54 -04:00
Jeff Moyer b2f83016cc io_uring: annotate offset timeout races
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit 5498bf28d8f2bd63a46ad40f4427518615fb793f
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri May 19 15:21:16 2023 +0100

    io_uring: annotate offset timeout races
    
    It's racy to read ->cached_cq_tail without taking proper measures
    (usually grabbing ->completion_lock) as timeout requests with CQE
    offsets do, however they have never had a good semantics for from
    when they start counting. Annotate racy reads with data_race().
    
    Reported-by: syzbot+cb265db2f3f3468ef436@syzkaller.appspotmail.com
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/4de3685e185832a92a572df2be2c735d2e21a83d.1684506056.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:53 -04:00
Jeff Moyer 111f902ee1 io_uring: add support for multishot timeouts
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit ea97f6c8558e83cb457c3b5f53351e4fd8519ab1
Author: David Wei <davidhwei@meta.com>
Date:   Tue Apr 18 15:58:18 2023 -0700

    io_uring: add support for multishot timeouts
    
    A multishot timeout submission will repeatedly generate completions with
    the IORING_CQE_F_MORE cflag set. Depending on the value of the `off'
    field in the submission, these timeouts can either repeat indefinitely
    until cancelled (`off' = 0) or for a fixed number of times (`off' > 0).
    
    Only noseq timeouts (i.e. not dependent on the number of I/O
    completions) are supported.
    
    An indefinite timer will be cancelled if the CQ ever overflows.
    
    Signed-off-by: David Wei <davidhwei@meta.com>
    Link: https://lore.kernel.org/r/20230418225817.1905027-1-davidhwei@meta.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:34 -04:00
Jeff Moyer b39b11cefd io_uring: encapsulate task_work state
JIRA: https://issues.redhat.com/browse/RHEL-12076
Conflicts: We backported the -stable series fix for commit
  ef7dfac51d8e ("io_uring/poll: serialize poll linked timer start with
  poll removal"), which used a local "locked" variable instead of a
  struct io_tw_state.  This patch converts the code to the io_tw_state
  now that the infrastructure is in place for it.  Compare the results
  after applying this patch with the output of the following command
  run against an upstream kernel:
    git show ef7dfac51d8ed961b742218f526bd589f3900a59:io_uring/poll.c

commit a282967c848fb1d92c28334430c472da9c334e54
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Mon Mar 27 16:38:15 2023 +0100

    io_uring: encapsulate task_work state
    
    For task works we're passing around a bool pointer for whether the
    current ring is locked or not, let's wrap it in a structure, that
    will make it more opaque preventing abuse and will also help us
    to pass more info in the future if needed.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 15:31:29 -04:00
Jeff Moyer d3afe63015 io_uring: ease timeout flush locking requirements
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit e5f30f6fb29a0b8fa7ca784e44571a610b949b04
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Dec 2 17:47:24 2022 +0000

    io_uring: ease timeout flush locking requirements
    
    We don't need completion_lock for timeout flushing, don't take it.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/1e3dc657975ac445b80e7bdc40050db783a5935a.1670002973.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:23 -04:00
Jeff Moyer 43c4f0dcd2 io_uring: revise completion_lock locking
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 6971253f078766543c716db708ba2c787826690d
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Dec 2 17:47:23 2022 +0000

    io_uring: revise completion_lock locking
    
    io_kill_timeouts() doesn't post any events but queues everything to
    task_work. Locking there is needed for protecting linked requests
    traversing, we should grab completion_lock directly instead of using
    io_cq_[un]lock helpers. Same goes for __io_req_find_next_prep().
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/88e75d481a65dc295cb59722bb1cf76402d1c06b.1670002973.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:23 -04:00
Jeff Moyer 7374553fb9 io_uring: protect cq_timeouts with timeout_lock
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit ea011ee10231f5fa6cbb415007048ca0bb948baf
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Fri Dec 2 17:47:22 2022 +0000

    io_uring: protect cq_timeouts with timeout_lock
    
    Read cq_timeouts in io_flush_timeouts() only after taking the
    timeout_lock, as it's protected by it. There are many places where we
    also grab ->completion_lock, but for instance io_timeout_fn() doesn't
    and still modifies cq_timeouts.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/9c79544dd6cf5c4018cb1bab99cf481a93ea46ef.1670002973.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:23 -04:00
Jeff Moyer 19a3928176 io_uring: remove io_req_tw_post_queue
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 833b5dfffc26c81835ce38e2a5df9ac5fa142735
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Nov 23 11:33:39 2022 +0000

    io_uring: remove io_req_tw_post_queue
    
    Remove io_req_tw_post() and io_req_tw_post_queue(), we can use
    io_req_task_complete() instead.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/b9b73c08022c7f1457023ac841f35c0100e70345.1669203009.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:10 -04:00
Jeff Moyer ae0fa77c98 io_uring: use io_req_task_complete() in timeout
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 624fd779fd869bdcb2c0ccca0f09456eed71ed52
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Wed Nov 23 11:33:38 2022 +0000

    io_uring: use io_req_task_complete() in timeout
    
    Use a more generic io_req_task_complete() in timeout completion
    task_work instead of io_req_complete_post().
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/bda1710b58c07bf06107421c2a65c529ea9cdcac.1669203009.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:10 -04:00
Jeff Moyer ec9db9ba21 io_uring: remove unused return from io_disarm_next
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit c0dc995eb2295e1be6b95b60c90c59f87b009bdb
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Sep 8 16:56:57 2022 +0100

    io_uring: remove unused return from io_disarm_next
    
    We removed conditional io_commit_cqring_flush() guarding against
    spurious eventfd and the io_disarm_next()'s return value is not used
    anymore, just void it.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/9a441c9a32a58bcc586076fa9a7d0dc33f1fb3cb.1662652536.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:23:54 -04:00
Jeff Moyer 95438cbb8c io_uring: make io_kiocb_to_cmd() typesafe
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit f2ccb5aed7bce1d8b3ed5b3385759a5509663028
Author: Stefan Metzmacher <metze@samba.org>
Date:   Thu Aug 11 09:11:15 2022 +0200

    io_uring: make io_kiocb_to_cmd() typesafe
    
    We need to make sure (at build time) that struct io_cmd_data is not
    casted to a structure that's larger.
    
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Link: https://lore.kernel.org/r/c024cdf25ae19fc0319d4180e2298bade8ed17b8.1660201408.git.metze@samba.org
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 08:43:02 -04:00
Jeff Moyer 4101d0b1f2 io_uring: improve io_fail_links()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 37c7bd31b3e9e4b6aee3c5227f789c0b586a33a2
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Sat Jun 25 11:52:58 2022 +0100

    io_uring: improve io_fail_links()
    
    io_fail_links() is called with ->completion_lock held and for that
    reason we'd want to keep it as small as we can. Instead of doing
    __io_req_complete_post() for each linked request under the lock, fail
    them in a task_work handler under ->uring_lock.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/a2f68708b970a21f4e84ddfa7b3abd67a8fffb27.1656153285.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 07:00:02 -04:00
Jeff Moyer 100129cbc2 io_uring: have cancelation API accept io_uring_task directly
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 88f52eaad2df2cb5ab49b864d79398c9cb9a57f2
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sat Jun 18 09:23:54 2022 -0600

    io_uring: have cancelation API accept io_uring_task directly
    
    We just use the io_kiocb passed in to find the io_uring_task, and we
    already pass in the ctx via cd->ctx anyway.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:49:02 -04:00
Jeff Moyer 50c8b0414a io_uring: introduce locking helpers for CQE posting
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 253993210bd8aa3b39a392807c03c8ef1cd7dc3d
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Mon Jun 20 01:25:56 2022 +0100

    io_uring: introduce locking helpers for CQE posting
    
    spin_lock(&ctx->completion_lock);
    /* post CQEs */
    io_commit_cqring(ctx);
    spin_unlock(&ctx->completion_lock);
    io_cqring_ev_posted(ctx);
    
    We have many places repeating this sequence, and the three function
    unlock section is not perfect from the maintainance perspective and also
    makes it harder to add new locking/sync trick.
    
    Introduce two helpers. io_cq_lock(), which is simple and only grabs
    ->completion_lock, and io_cq_unlock_post() encapsulating the three call
    section.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/fe0c682bf7f7b55d9be55b0d034be9c1949277dc.1655684496.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:31:02 -04:00
Jeff Moyer 252adb412d io_uring: hide eventfd assumptions in eventfd paths
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 305bef98870816ae58357d647521891ec558a92e
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Mon Jun 20 01:25:55 2022 +0100

    io_uring: hide eventfd assumptions in eventfd paths
    
    Some io_uring-eventfd users assume that there won't be spurious wakeups.
    That assumption has to be honoured by all io_cqring_ev_posted() callers,
    which is inconvenient and from time to time leads to problems but should
    be maintained to not break the userspace.
    
    Instead of making the callers track whether a CQE was posted or not, hide
    it inside io_eventfd_signal(). It saves ->cached_cq_tail it saw last time
    and triggers the eventfd only when ->cached_cq_tail changed since then.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/0ffc66bae37a2513080b601e4370e147faaa72c5.1655684496.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:30:02 -04:00
Jeff Moyer c2524d18b2 io_uring: improve task exit timeout cancellations
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit ba3cdb6fbb6e8eb525c868c60e103c5711edc068
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Mon Jun 20 01:25:53 2022 +0100

    io_uring: improve task exit timeout cancellations
    
    Don't spin trying to cancel timeouts that are reachable but not
    cancellable, e.g. already executing.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/ab8a7440a60bbdf69ae514f672ad050e43dd1b03.1655684496.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:28:02 -04:00
Jeff Moyer ba6a1bff98 io_uring: clean up tracing events
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 48863ffd3e81b6ec98606d3479c50aa77b7a98a9
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Jun 16 13:57:20 2022 +0100

    io_uring: clean up tracing events
    
    We have lots of trace events accepting an io_uring request and wanting
    to print some of its fields like user_data, opcode, flags and so on.
    However, as trace points were unaware of io_uring structures, we had to
    pass all the fields as arguments. Teach trace/events/io_uring.h about
    struct io_kiocb and stop the misery of passing a horde of arguments to
    trace helpers.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/40ff72f92798114e56d400f2b003beb6cde6ef53.1655384063.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:21:02 -04:00
Jeff Moyer 8034d812f4 io_uring: kill extra io_uring_types.h includes
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 27a9d66fec77cff0e32d2ecd5d0ac7ef878a7bb0
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Jun 16 13:57:18 2022 +0100

    io_uring: kill extra io_uring_types.h includes
    
    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>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:19:02 -04:00
Jeff Moyer 112b5afa30 io_uring: propagate locking state to poll cancel
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 5d7943d99df9326c7b02f773b2d6f09709c30594
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Jun 16 10:22:11 2022 +0100

    io_uring: propagate locking state to poll cancel
    
    Poll cancellation will be soon need to grab ->uring_lock inside, pass
    the locking state, i.e. issue_flags, inside the cancellation functions.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/b86781d047727c07163443b57551a3fa57c7c5e1.1655371007.git.asml.silence@gmail.com
    Reviewed-by: Hao Xu <howeyxu@tencent.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:10:02 -04:00
Jeff Moyer 4b7eca3078 io_uring: move cancelation into its own file
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 7aaff708a768144ec6459f0a58301be1a6b982fc
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed May 25 20:36:47 2022 -0600

    io_uring: move cancelation into its own file
    
    This also helps cleanup the io_uring.h cancel parts, as we can make
    things static in the cancel.c file, mostly.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 05:37:02 -04:00
Jeff Moyer 61fb9ef3fc io_uring: move timeout opcodes and handling into its own file
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 59915143e89fb8dc7b5bd9dcaf628d8181fd54ac
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed May 25 08:57:27 2022 -0600

    io_uring: move timeout opcodes and handling into its own file
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 05:29:02 -04:00