{
  "slug": "io-uring-linked-requests",
  "term": "io_uring linked requests",
  "aliases": [
    "IOSQE_IO_LINK",
    "IOSQE_IO_HARDLINK"
  ],
  "definition": "io_uring linked requests are a chain of submission entries whose dependencies delay each successor until its predecessor completes.",
  "note": "IO_LINK is local to its chain and does not order unrelated requests. A chain must stay within a submission boundary, and the last entry of a submission ends the chain even when its link flag is set. IO_HARDLINK retains a link across a completion error; it does not convert the failed operation into a successful one. [flags] [enter]\n\nIn the Linux v6.16 ABI, IOSQE_IO_LINK is flag bit 2 with value 4 and IOSQE_IO_HARDLINK is bit 3 with value 8. The link flag is available since Linux 5.3 and the hard link since 5.5. [uapi-header] [enter]\n\nAny unexpected result, including a short read, breaks an ordinary chain. Without completion suppression, the unstarted remainder reports -ECANCELED. A hard link still severs if the parent request fails at submission rather than at completion. [enter]\n\nIn a chain without linked timeouts or IO_HARDLINK, a skip-enabled failure reports its own result while subsequent linked CQEs are omitted. [suppression-enter] In the upstream normal-chain tests, successful predecessors suppress their reports and the tail reports success; a failing request instead supplies the sole report. Waiting only for the tail can therefore miss the failure path. The unsuppressed tail can also fail: its identity alone never establishes success. This is source review, not an executed kernel test. [suppression-tests]",
  "status": "shipping",
  "advantages": [
    {
      "text": "Expresses dependencies without waiting in user space between every operation.",
      "citationIds": [
        "flags"
      ]
    },
    {
      "text": "Several chains and single requests can run in parallel, because only members of one chain are serialized.",
      "citationIds": [
        "enter"
      ]
    }
  ],
  "limitations": [
    "Ordering a chain does not make its side effects an atomic transaction.",
    {
      "text": "The chain breaks only on results that io_uring treats as errors, so an application-level check on an earlier result cannot stop later members.",
      "citationIds": [
        "enter"
      ]
    }
  ],
  "related": [
    "io-uring",
    "io-uring-cqe",
    "io-uring-drain",
    "persistence-ordering",
    "io-uring-cancellation",
    "io-uring-linked-timeout"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-12",
  "citations": [
    {
      "id": "flags",
      "title": "liburing 2.9: io_uring_sqe_set_flags(3), chain and drain scope.",
      "url": "https://github.com/axboe/liburing/blob/liburing-2.9/man/io_uring_sqe_set_flags.3",
      "accessed": "2026-10-14"
    },
    {
      "id": "hesela-uring",
      "title": "io_uring: completion is not a durable commit",
      "url": "https://hesela.com/analyses/io-uring-completion-ordering-durability/",
      "accessed": "2026-10-14"
    },
    {
      "id": "enter",
      "title": "Linux man-pages, io_uring_enter(2): IOSQE_IO_LINK and IOSQE_IO_HARDLINK",
      "url": "https://man7.org/linux/man-pages/man2/io_uring_enter.2.html",
      "accessed": "2026-10-22"
    },
    {
      "id": "uapi-header",
      "title": "Linux v6.16 include/uapi/linux/io_uring.h: SQE flag bits",
      "url": "https://github.com/torvalds/linux/blob/v6.16/include/uapi/linux/io_uring.h",
      "accessed": "2026-10-22"
    },
    {
      "id": "suppression-enter",
      "title": "liburing 2.11: io_uring_enter(2), IOSQE_CQE_SKIP_SUCCESS and link/timeout exceptions",
      "url": "https://github.com/axboe/liburing/blob/liburing-2.11/man/io_uring_enter.2",
      "accessed": "2026-11-12"
    },
    {
      "id": "suppression-tests",
      "title": "liburing 2.11: skip-cqe.c, test_link_success and test_link_fail (source inspection only)",
      "url": "https://github.com/axboe/liburing/blob/liburing-2.11/test/skip-cqe.c",
      "accessed": "2026-11-12"
    }
  ],
  "provenance": [
    "flags is the liburing 2.9 io_uring_sqe_set_flags(3) page, kept from the earlier version.",
    "enter is the Linux man-pages io_uring_enter(2) page, read on the access date in IOSQE_IO_LINK and IOSQE_IO_HARDLINK.",
    "uapi-header is include/uapi/linux/io_uring.h at tag v6.16, read in the IOSQE_*_BIT enumeration and flag definitions.",
    "Bits 2 and 3 and values 4 and 8 come from uapi-header. 5.3, 5.5 and -ECANCELED come from enter."
  ]
}
