get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196390/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196390,
    "url": "http://patchwork.ozlabs.org/api/patches/2196390/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213171622.55629-4-zhangckid@gmail.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260213171622.55629-4-zhangckid@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-13T17:16:22",
    "name": "[V4,4/4] qapi: examine IOThread attachment status via query-iothreads",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1bc0d2df1a43b88929548b6f8b7ba00ae9d2bce1",
    "submitter": {
        "id": 72278,
        "url": "http://patchwork.ozlabs.org/api/people/72278/?format=api",
        "name": "Zhang Chen",
        "email": "zhangckid@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213171622.55629-4-zhangckid@gmail.com/mbox/",
    "series": [
        {
            "id": 492123,
            "url": "http://patchwork.ozlabs.org/api/series/492123/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492123",
            "date": "2026-02-13T17:16:20",
            "name": "[V4,1/4] qapi/misc: Fix missed query-iothreads items",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/492123/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196390/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196390/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=c6GJBI4v;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fCJl61KRRz1xxM\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 04:17:36 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vqwmy-0007cy-9n; Fri, 13 Feb 2026 12:17:08 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <zhangckid@gmail.com>)\n id 1vqwmu-0007cX-CJ\n for qemu-devel@nongnu.org; Fri, 13 Feb 2026 12:17:06 -0500",
            "from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <zhangckid@gmail.com>)\n id 1vqwmr-0006xq-Nl\n for qemu-devel@nongnu.org; Fri, 13 Feb 2026 12:17:03 -0500",
            "by mail-pl1-x62d.google.com with SMTP id\n d9443c01a7336-2aad1dc8856so8239165ad.1\n for <qemu-devel@nongnu.org>; Fri, 13 Feb 2026 09:17:00 -0800 (PST)",
            "from localhost.localdomain ([104.168.88.121])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2ab29998c45sm87095575ad.88.2026.02.13.09.16.53\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 13 Feb 2026 09:16:58 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1771003019; x=1771607819; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=nragqWZQYCFHAzml/nKwPBaRW79jUqjKSSqj3EtsaSE=;\n b=c6GJBI4vw5ngcZLURTY/NWrzsnrSfkmHEdms2axmXqtqqr4i6l9FN80qBW86rAsT6K\n vZf2nrXA+LrKmyIvGa4uCzm2ZxWi5EcnATmXG4jE9QrvEAaNHGgDwtsYFSlOv8kIKoL1\n fn1bHD8qiEoQRY+jwo5GM6xZHO6kiRi63vODKgxxrODTKhsfmk2zSx9nmU+XcKxyH4bZ\n 08Inm/2sOAQSuRRBWx5c4Bm+AUxTJpyrgINgHN8saFL5x8eU81e2KtmIsYdIMzLPV0Ws\n WT5SIleXPTwBJz9WBTaUGHm+7JqM4ZpJfRqxb2y6rruU6DD8LTzVo70BmB4ukQU3erTF\n tb8Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771003019; x=1771607819;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=nragqWZQYCFHAzml/nKwPBaRW79jUqj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MTP id\n d9443c01a7336-2ad17545608mr494045ad.41.1771003018951;\n Fri, 13 Feb 2026 09:16:58 -0800 (PST)",
        "From": "Zhang Chen <zhangckid@gmail.com>",
        "To": "qemu-devel <qemu-devel@nongnu.org>,\n \"Dr . David Alan Gilbert\" <dave@treblig.org>,\n Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n \"Michael S . Tsirkin\" <mst@redhat.com>,\n Stefan Hajnoczi <stefanha@redhat.com>",
        "Cc": "Zhang Chen <zhangckid@gmail.com>",
        "Subject": "[PATCH V4 4/4] qapi: examine IOThread attachment status via\n query-iothreads",
        "Date": "Sat, 14 Feb 2026 01:16:22 +0800",
        "Message-ID": "<20260213171622.55629-4-zhangckid@gmail.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20260213171622.55629-1-zhangckid@gmail.com>",
        "References": "<20260213171622.55629-1-zhangckid@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::62d;\n envelope-from=zhangckid@gmail.com; helo=mail-pl1-x62d.google.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Extend the 'IOThreadInfo' structure to include attachment metrics.\nThis allows users to monitor how many devices are associated with\na specific IOThread and identify them by their QOM paths.\n\nNew fields added to IOThreadInfo:\n- @attached-cnt: An integer representing the number of devices\n  currently using this IOThread's AioContext.\n- @attached-dev: A string containing a delimited list (\"|\") of\n  QOM paths for the attached devices.\n\nThese fields are also exposed via the Human Monitor Interface (HMP)\ncommand 'info iothreads' to assist with manual debugging and\nperformance tuning.\n\nExample QMP output:\n{\n    \"id\": \"iothread0\",\n    \"thread-id\": 3134,\n    \"attached-cnt\": 2,\n    \"attached-dev\": \"/machine/peripheral/blk1/virtio-backend | /machine/peripheral/blk0/virtio-backend\",\n    ...\n}\n\nSigned-off-by: Zhang Chen <zhangckid@gmail.com>\n---\n iothread.c         | 24 ++++++++++++++++++++++++\n monitor/hmp-cmds.c |  3 +++\n qapi/misc.json     | 19 +++++++++++++++++++\n 3 files changed, 46 insertions(+)",
    "diff": "diff --git a/iothread.c b/iothread.c\nindex b869637497..4fceed28c5 100644\n--- a/iothread.c\n+++ b/iothread.c\n@@ -71,6 +71,28 @@ void iothread_unref(IOThread *iothread, const char *holder)\n     }\n }\n \n+static char *iothread_get_attached_dev_list(IOThread *iothread)\n+{\n+    guint len = g_list_length(iothread->attached_dev);\n+\n+    if (len == 0) {\n+        return g_strdup(\"none\");\n+    }\n+\n+    gchar **array = g_new0(gchar *, len + 1);\n+    GList *l;\n+    int i = 0;\n+\n+    for (l = iothread->attached_dev; l != NULL; l = l->next) {\n+        array[i++] = l->data;\n+    }\n+\n+    char *result = g_strjoinv(\" | \", array);\n+    g_free(array);\n+\n+    return result;\n+}\n+\n static void *iothread_run(void *opaque)\n {\n     IOThread *iothread = opaque;\n@@ -388,6 +410,8 @@ static int query_one_iothread(Object *object, void *opaque)\n     info = g_new0(IOThreadInfo, 1);\n     info->id = iothread_get_id(iothread);\n     info->thread_id = iothread->thread_id;\n+    info->attached_cnt = iothread->attached_cnt;\n+    info->attached_dev = iothread_get_attached_dev_list(iothread);\n     info->poll_max_ns = iothread->poll_max_ns;\n     info->poll_grow = iothread->poll_grow;\n     info->poll_shrink = iothread->poll_shrink;\ndiff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c\nindex bad034937a..026bed1545 100644\n--- a/monitor/hmp-cmds.c\n+++ b/monitor/hmp-cmds.c\n@@ -203,6 +203,9 @@ void hmp_info_iothreads(Monitor *mon, const QDict *qdict)\n         value = info->value;\n         monitor_printf(mon, \"%s:\\n\", value->id);\n         monitor_printf(mon, \"  thread_id=%\" PRId64 \"\\n\", value->thread_id);\n+        monitor_printf(mon, \"  attached-cnt=%\" PRId64 \"\\n\",\n+                       value->attached_cnt);\n+        monitor_printf(mon, \"  attached-dev=%s\\n\", value->attached_dev);\n         monitor_printf(mon, \"  poll-max-ns=%\" PRId64 \"\\n\", value->poll_max_ns);\n         monitor_printf(mon, \"  poll-grow=%\" PRId64 \"\\n\", value->poll_grow);\n         monitor_printf(mon, \"  poll-shrink=%\" PRId64 \"\\n\", value->poll_shrink);\ndiff --git a/qapi/misc.json b/qapi/misc.json\nindex 1f5062df2a..ca53638684 100644\n--- a/qapi/misc.json\n+++ b/qapi/misc.json\n@@ -76,6 +76,19 @@\n #\n # @thread-id: ID of the underlying host thread\n #\n+# @attached-cnt: The parameter is a counter indicating how many\n+#     active devices are currently associated with this iothread\n+#     (e.g. virtio-blk).  In hotplug scenarios, users can\n+#     pre-allocate multiple iothread objects to serve as a persistent\n+#     thread pool.  When a device is hot-unplugged, the corresponding\n+#     IOThread is released but remains available, allowing subsequent\n+#     hot-plugged devices to attach to and reuse the existing thread.\n+#     (since 11.0)\n+#\n+# @attached-dev: A list of QOM paths for the devices currently\n+#     associated with this IOThread, delimited by \" | \".\n+#     Returns \"none\" if no devices are attached. (since 11.0)\n+#\n # @poll-max-ns: maximum polling time in ns, 0 means polling is\n #     disabled (since 2.9)\n #\n@@ -93,6 +106,8 @@\n { 'struct': 'IOThreadInfo',\n   'data': {'id': 'str',\n            'thread-id': 'int',\n+           'attached-cnt': 'int',\n+           'attached-dev': 'str',\n            'poll-max-ns': 'int',\n            'poll-grow': 'int',\n            'poll-shrink': 'int',\n@@ -118,6 +133,8 @@\n #              {\n #                 \"id\":\"iothread0\",\n #                 \"thread-id\":3134,\n+#                 \"attached-cnt\":2,\n+#                 \"attached-dev\":/machine/peripheral/blk1/virtio-backend | /machine/peripheral/blk0/virtio-backend,\n #                 \"poll-max-ns\":32768,\n #                 \"poll-grow\":0,\n #                 \"poll-shrink\":0,\n@@ -126,6 +143,8 @@\n #              {\n #                 \"id\":\"iothread1\",\n #                 \"thread-id\":3135,\n+#                 \"attached-cnt\":1,\n+#                 \"attached-dev\":/machine/peripheral/blk3/virtio-backend,\n #                 \"poll-max-ns\":32768,\n #                 \"poll-grow\":0,\n #                 \"poll-shrink\":0,\n",
    "prefixes": [
        "V4",
        "4/4"
    ]
}