get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221998,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221998/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410150457.85190-8-zhangckid@gmail.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": ""
    },
    "msgid": "<20260410150457.85190-8-zhangckid@gmail.com>",
    "date": "2026-04-10T15:04:50",
    "name": "[V6,07/14] virtio-vq-mapping: track iothread-vq-mapping references using device path",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5abdbe8d087cfe6df7ab8b0a861121348dc7c576",
    "submitter": {
        "id": 72278,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/72278/?format=api",
        "name": "Zhang Chen",
        "email": "zhangckid@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410150457.85190-8-zhangckid@gmail.com/mbox/",
    "series": [
        {
            "id": 499477,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499477/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499477",
            "date": "2026-04-10T15:04:43",
            "name": "iothread: Support tracking and querying IOThread holders",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/499477/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221998/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221998/checks/",
    "tags": {},
    "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=20251104 header.b=Wqo4meYb;\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 (lists1p.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 4fsg9x4Q1mz1yGS\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 01:06:29 +1000 (AEST)",
            "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 1wBDQT-00076D-4b; Fri, 10 Apr 2026 11:05:41 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.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 1wBDQR-00070q-EG\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 11:05:39 -0400",
            "from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032])\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 1wBDQP-0002W2-Ln\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 11:05:39 -0400",
            "by mail-pj1-x1032.google.com with SMTP id\n 98e67ed59e1d1-35da2d35eccso1777941a91.0\n for <qemu-devel@nongnu.org>; Fri, 10 Apr 2026 08:05:37 -0700 (PDT)",
            "from ZBMac-LWN10QXKQ0.taila0cd24.ts.net ([104.168.88.121])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35e4131cfacsm3565785a91.10.2026.04.10.08.05.31\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 10 Apr 2026 08:05:34 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775833536; x=1776438336; 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=+ccoofNrZf0b3d/nWoo3fwp+WZHm2ASoYUOnT7UOhwQ=;\n b=Wqo4meYbFzIIyHs55rxrX2HdZ/l+khCiP60xVrx21mGvWZYnY/YEpI7N2SDn6Zi+Ss\n voYYTyBIiwhwMQQW6x4XRJ7FMyWqK4lh7M3opb3OLNZt6ydixL4JDoxdtkoRTJyoIbVC\n 6lrqA7PU1bTMltmiZrgT2F3QJEzAHUoBGraAymxVLRMk9W2QnHezK3ImaKGB6w0OBBA4\n 7vHC8dPIBHsommiQzy1K3T1jO41v1XdPbFfKSsgaFGUGVwQfy6F7WicXjRyrsco9iIQP\n SB2jwllp2aVDeaKFHf4Ht5SOtRQQwnnvdRG96Uz69GXxVbo8GvXUo27QOXW3MOqKT7tF\n kAXw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775833536; x=1776438336;\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=+ccoofNrZf0b3d/nWoo3fwp+WZHm2ASoYUOnT7UOh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ac5 with SMTP id\n 98e67ed59e1d1-35e4276f4fdmr3702742a91.7.1775833535521;\n Fri, 10 Apr 2026 08:05:35 -0700 (PDT)",
        "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 V6 07/14] virtio-vq-mapping: track iothread-vq-mapping\n references using device path",
        "Date": "Fri, 10 Apr 2026 23:04:50 +0800",
        "Message-ID": "<20260410150457.85190-8-zhangckid@gmail.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20260410150457.85190-1-zhangckid@gmail.com>",
        "References": "<20260410150457.85190-1-zhangckid@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::1032;\n envelope-from=zhangckid@gmail.com; helo=mail-pj1-x1032.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": "Replace raw object_ref/unref calls with iothread_get/put_aio_context\nin iothread-vq-mapping. This allows tracking IOThread users via\nthe device's canonical QOM path, improving lifecycle traceability\nfor virtio-blk and virtio-scsi devices.\n\nSigned-off-by: Zhang Chen <zhangckid@gmail.com>\n---\n hw/block/virtio-blk.c                   |  8 +++++++-\n hw/scsi/virtio-scsi-dataplane.c         |  9 +++++++--\n hw/virtio/iothread-vq-mapping.c         | 11 +++++------\n include/hw/virtio/iothread-vq-mapping.h |  6 +++++-\n 4 files changed, 24 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c\nindex ddf0e9ee53..762714f4ba 100644\n--- a/hw/block/virtio-blk.c\n+++ b/hw/block/virtio-blk.c\n@@ -1453,9 +1453,12 @@ static bool virtio_blk_vq_aio_context_init(VirtIOBlock *s, Error **errp)\n     s->vq_aio_context = g_new(AioContext *, conf->num_queues);\n \n     if (conf->iothread_vq_mapping_list) {\n+        g_autofree char *path = object_get_canonical_path(OBJECT(vdev));\n+\n         if (!iothread_vq_mapping_apply(conf->iothread_vq_mapping_list,\n                                        s->vq_aio_context,\n                                        conf->num_queues,\n+                                       path,\n                                        errp)) {\n             g_free(s->vq_aio_context);\n             s->vq_aio_context = NULL;\n@@ -1487,7 +1490,10 @@ static void virtio_blk_vq_aio_context_cleanup(VirtIOBlock *s)\n     assert(!s->ioeventfd_started);\n \n     if (conf->iothread_vq_mapping_list) {\n-        iothread_vq_mapping_cleanup(conf->iothread_vq_mapping_list);\n+        g_autofree char *path = object_get_canonical_path(\n+                                OBJECT(VIRTIO_DEVICE(s)));\n+\n+        iothread_vq_mapping_cleanup(conf->iothread_vq_mapping_list, path);\n     }\n \n     if (conf->iothread) {\ndiff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c\nindex 95f13fb7c2..26ecefd547 100644\n--- a/hw/scsi/virtio-scsi-dataplane.c\n+++ b/hw/scsi/virtio-scsi-dataplane.c\n@@ -65,9 +65,11 @@ void virtio_scsi_dataplane_setup(VirtIOSCSI *s, Error **errp)\n     s->vq_aio_context[1] = qemu_get_aio_context();\n \n     if (vs->conf.iothread_vq_mapping_list) {\n+        g_autofree char *path = object_get_canonical_path(OBJECT(vdev));\n+\n         if (!iothread_vq_mapping_apply(vs->conf.iothread_vq_mapping_list,\n                     &s->vq_aio_context[VIRTIO_SCSI_VQ_NUM_FIXED],\n-                    vs->conf.num_queues, errp)) {\n+                    vs->conf.num_queues, path, errp)) {\n             g_free(s->vq_aio_context);\n             s->vq_aio_context = NULL;\n             return;\n@@ -94,7 +96,10 @@ void virtio_scsi_dataplane_cleanup(VirtIOSCSI *s)\n     VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);\n \n     if (vs->conf.iothread_vq_mapping_list) {\n-        iothread_vq_mapping_cleanup(vs->conf.iothread_vq_mapping_list);\n+        g_autofree char *path = object_get_canonical_path(\n+                                OBJECT(VIRTIO_DEVICE(s)));\n+\n+        iothread_vq_mapping_cleanup(vs->conf.iothread_vq_mapping_list, path);\n     }\n \n     if (vs->conf.iothread) {\ndiff --git a/hw/virtio/iothread-vq-mapping.c b/hw/virtio/iothread-vq-mapping.c\nindex 55ce62986c..c993281d7f 100644\n--- a/hw/virtio/iothread-vq-mapping.c\n+++ b/hw/virtio/iothread-vq-mapping.c\n@@ -77,6 +77,7 @@ bool iothread_vq_mapping_apply(\n         IOThreadVirtQueueMappingList *list,\n         AioContext **vq_aio_context,\n         uint16_t num_queues,\n+        const char *holder,\n         Error **errp)\n {\n     IOThreadVirtQueueMappingList *node;\n@@ -93,10 +94,7 @@ bool iothread_vq_mapping_apply(\n \n     for (node = list; node; node = node->next) {\n         IOThread *iothread = iothread_by_id(node->value->iothread);\n-        AioContext *ctx = iothread_get_aio_context(iothread);\n-\n-        /* Released in virtio_blk_vq_aio_context_cleanup() */\n-        object_ref(OBJECT(iothread));\n+        AioContext *ctx = iothread_ref_and_get_aio_context(iothread, holder);\n \n         if (node->value->vqs) {\n             uint16List *vq;\n@@ -120,13 +118,14 @@ bool iothread_vq_mapping_apply(\n     return true;\n }\n \n-void iothread_vq_mapping_cleanup(IOThreadVirtQueueMappingList *list)\n+void iothread_vq_mapping_cleanup(IOThreadVirtQueueMappingList *list,\n+                                 const char *holder)\n {\n     IOThreadVirtQueueMappingList *node;\n \n     for (node = list; node; node = node->next) {\n         IOThread *iothread = iothread_by_id(node->value->iothread);\n-        object_unref(OBJECT(iothread));\n+        iothread_put_aio_context(iothread, holder);\n     }\n }\n \ndiff --git a/include/hw/virtio/iothread-vq-mapping.h b/include/hw/virtio/iothread-vq-mapping.h\nindex 57335c3703..0d39caddf3 100644\n--- a/include/hw/virtio/iothread-vq-mapping.h\n+++ b/include/hw/virtio/iothread-vq-mapping.h\n@@ -17,6 +17,7 @@\n  * @list: The mapping of virtqueues to IOThreads.\n  * @vq_aio_context: The array of AioContext pointers to fill in.\n  * @num_queues: The length of @vq_aio_context.\n+ * @holder: The QOM paths for attached device.\n  * @errp: If an error occurs, a pointer to the area to store the error.\n  *\n  * Fill in the AioContext for each virtqueue in the @vq_aio_context array given\n@@ -31,15 +32,18 @@ bool iothread_vq_mapping_apply(\n         IOThreadVirtQueueMappingList *list,\n         AioContext **vq_aio_context,\n         uint16_t num_queues,\n+        const char *holder,\n         Error **errp);\n \n /**\n  * iothread_vq_mapping_cleanup:\n  * @list: The mapping of virtqueues to IOThreads.\n+ * @holder: The QOM paths for attached device.\n  *\n  * Release IOThread object references that were acquired by\n  * iothread_vq_mapping_apply().\n  */\n-void iothread_vq_mapping_cleanup(IOThreadVirtQueueMappingList *list);\n+void iothread_vq_mapping_cleanup(IOThreadVirtQueueMappingList *list,\n+                                 const char *holder);\n \n #endif /* HW_VIRTIO_IOTHREAD_VQ_MAPPING_H */\n",
    "prefixes": [
        "V6",
        "07/14"
    ]
}