get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2194212,
    "url": "http://patchwork.ozlabs.org/api/patches/2194212/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260207120901.17222-4-hibriansong@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": "<20260207120901.17222-4-hibriansong@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-07T12:08:57",
    "name": "[v4,3/7] fuse: uring support for write ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "74ad419f664968b6f0f49376667983fe58b9f390",
    "submitter": {
        "id": 90672,
        "url": "http://patchwork.ozlabs.org/api/people/90672/?format=api",
        "name": "Brian Song",
        "email": "hibriansong@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260207120901.17222-4-hibriansong@gmail.com/mbox/",
    "series": [
        {
            "id": 491376,
            "url": "http://patchwork.ozlabs.org/api/series/491376/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491376",
            "date": "2026-02-07T12:08:56",
            "name": "add fuse-over-io_uring support",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/491376/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194212/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194212/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=FrOS+C8k;\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 4f7VD51VG8z1xvj\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 23:11:01 +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 1voh8U-00079p-P5; Sat, 07 Feb 2026 07:10:02 -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 <hibriansong@gmail.com>)\n id 1voh8S-00079G-Uj\n for qemu-devel@nongnu.org; Sat, 07 Feb 2026 07:10:00 -0500",
            "from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <hibriansong@gmail.com>)\n id 1voh8Q-0002sl-UI\n for qemu-devel@nongnu.org; Sat, 07 Feb 2026 07:10:00 -0500",
            "by mail-pj1-x102c.google.com with SMTP id\n 98e67ed59e1d1-354a4ef0c1eso1500407a91.2\n for <qemu-devel@nongnu.org>; Sat, 07 Feb 2026 04:09:58 -0800 (PST)",
            "from brian.. (n058152022104.netvigator.com. [58.152.22.104])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-354b30f899csm2178530a91.3.2026.02.07.04.09.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 07 Feb 2026 04:09:56 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770466198; x=1771070998; 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=G85lH42gCcMibdBM9mV1RiEav8F/CH9MqgVmO0gS/Qk=;\n b=FrOS+C8k1+yKx52ZeADia87/PrxwTgqEhMPvV2QR2L+omnfLjPpkT9Y9rQuLXal9uA\n RDsnO3DNQ6inSXbYuYibrTz49OR8cOaxSydmous5n5/DFuCiNA8F/AiqozvjijlnpQcB\n IhMl1FIaPjVUCGv+LnBbI4wYU+iCbnAlDkJvxzzIqGtI39F8DDFbedRWiENjFPbq+zcH\n oUEfupIFq4z7CSgw1SoUyLbyQnxvU4aLhLd6Ze6P4k/6DSBAcctW/YrbFiYYl/pMINIk\n qZzLjKzkMovlnc5pIy+2sRIl0uJ2UX7LGYTQQHNpON86JftyU8S/Pv+TRw2IA4+HnUFY\n t5QA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770466198; x=1771070998;\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=G85lH42gCcMibdBM9mV1RiEav8F/CH9MqgVmO0gS/Qk=;\n b=BxjqqaDeba4T+lreO9dzt0uqeHEXbvrPvZalSt8iwGj/2MIDDmtJJwiISMCN9bsqWh\n kfTdY7EEToMNsalcm6a+/DOX++NZJpzJFXhBm4geg/5TuzwuD+28EOAlqsNRjZ7rO3SU\n 7z6KJu6EzD/TF9m6NS3gVbHmY1QCAKDXMU50Jp1RP7eRQVMuiQw/hJuyVGN7y6SRPwVV\n Itkr7oNndw+KhxeVo5RPJChOc2jJl9zSc1eEue3MQLuq6sIMWHq7gk40vk2c+TH+pVE9\n /OV5G+FwVdgVIsX+HUZFAz2SmCQVyC5940DOjKEnknC/vG3sqyn6MlbbycDTrOz6sU/T\n knaA==",
        "X-Gm-Message-State": "AOJu0YwFJitdwVTOoUZshGV1bEs1K6W98nbBePJ5cO8WBn6d/y7N6Xh3\n Sim0sCfVNmd8GhF1SmuhUfwoalHv1Pj60L81oHaAEG04kApZ0Bqrtfmn",
        "X-Gm-Gg": "AZuq6aLnW8YzVCCTJ6GJp8UWZa6VTHvz89mQtibiHuwrhmMR2kWDliNyYXAB6G5QBMO\n tEy88kST7VdqxJ1Z5aFL9XJT3yKwvCYm/cthM5ZyEu7YsB+Wqv4rNlGxAiV1pfDrNtoLiDK7cFk\n NAI770FY87+aYzzd9NDm9px5VZ+8xowi5723RxTy8dVL5ZyqrX6R4DEoqm/zM8acJMHlKnWBZD7\n TB16DnlODIiG1I1ckirP1LqJ+ijNWo9VsSk1swU89+NJwii2JwTpIdFH9XLFMLP7bs8uIQhMzu3\n VXmhZiwHVjKhwArKdhDyBC47JUn6lLdylgfdQUtM6Vk+vyn4H3eqnzf21mCPMxf+O+0e+ymRA9S\n 51m69+8qzuyrksp6K5q9YI/UQ05RUjjFWRWDuvbPqyvHDEkpFhK5Or+NspJTMxUUqRN7henhVv9\n WWbZYKbnicfTVWEe2+NIi2bXw7qqFYVNeqZug7",
        "X-Received": "by 2002:a17:90b:4f49:b0:34c:2f3f:d27e with SMTP id\n 98e67ed59e1d1-354b3c52e02mr4587459a91.3.1770466197548;\n Sat, 07 Feb 2026 04:09:57 -0800 (PST)",
        "From": "Brian Song <hibriansong@gmail.com>",
        "To": "qemu-block@nongnu.org",
        "Cc": "qemu-devel@nongnu.org, hibriansong@gmail.com, hreitz@redhat.com,\n kwolf@redhat.com, eblake@redhat.com, armbru@redhat.com,\n stefanha@redhat.com, fam@euphon.net, bernd@bsbernd.com",
        "Subject": "[Patch v4 3/7] fuse: uring support for write ops",
        "Date": "Sat,  7 Feb 2026 20:08:57 +0800",
        "Message-ID": "<20260207120901.17222-4-hibriansong@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260207120901.17222-1-hibriansong@gmail.com>",
        "References": "<20260207120901.17222-1-hibriansong@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::102c;\n envelope-from=hibriansong@gmail.com; helo=mail-pj1-x102c.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": "The payload of each uring entry serves as the buffer holding file data\nfor read/write operations. In this patch, fuse_co_write is refactored\nto support using different buffer sources for write operations in\nlegacy and io_uring modes.\n\nSuggested-by: Kevin Wolf <kwolf@redhat.com>\nSuggested-by: Stefan Hajnoczi <stefanha@redhat.com>\nSigned-off-by: Brian Song <hibriansong@gmail.com>\n---\n block/export/fuse.c | 55 ++++++++++++++++++++++++++++++---------------\n 1 file changed, 37 insertions(+), 18 deletions(-)\n\n--\n2.43.0",
    "diff": "diff --git a/block/export/fuse.c b/block/export/fuse.c\nindex ae7490b2a1..867752555a 100644\n--- a/block/export/fuse.c\n+++ b/block/export/fuse.c\n@@ -1299,6 +1299,9 @@ fuse_co_read(FuseExport *exp, void **bufptr, uint64_t offset, uint32_t size)\n  * Data in @in_place_buf is assumed to be overwritten after yielding, so will\n  * be copied to a bounce buffer beforehand.  @spillover_buf in contrast is\n  * assumed to be exclusively owned and will be used as-is.\n+ * In FUSE-over-io_uring mode, the actual req_payload content is stored in\n+ * @spillover_buf. To ensure this buffer is used for writing, @in_place_buf\n+ * is explicitly set to NULL.\n  * Return the number of bytes written to *out on success, and -errno on error.\n  */\n static ssize_t coroutine_fn\n@@ -1306,8 +1309,8 @@ fuse_co_write(FuseExport *exp, struct fuse_write_out *out,\n               uint64_t offset, uint32_t size,\n               const void *in_place_buf, const void *spillover_buf)\n {\n-    size_t in_place_size;\n-    void *copied;\n+    size_t in_place_size = 0;\n+    void *copied = NULL;\n     int64_t blk_len;\n     int ret;\n     struct iovec iov[2];\n@@ -1322,10 +1325,12 @@ fuse_co_write(FuseExport *exp, struct fuse_write_out *out,\n         return -EACCES;\n     }\n\n-    /* Must copy to bounce buffer before potentially yielding */\n-    in_place_size = MIN(size, FUSE_IN_PLACE_WRITE_BYTES);\n-    copied = blk_blockalign(exp->common.blk, in_place_size);\n-    memcpy(copied, in_place_buf, in_place_size);\n+    if (in_place_buf) {\n+        /* Must copy to bounce buffer before potentially yielding */\n+        in_place_size = MIN(size, FUSE_IN_PLACE_WRITE_BYTES);\n+        copied = blk_blockalign(exp->common.blk, in_place_size);\n+        memcpy(copied, in_place_buf, in_place_size);\n+    }\n\n     /**\n      * Clients will expect short writes at EOF, so we have to limit\n@@ -1349,26 +1354,38 @@ fuse_co_write(FuseExport *exp, struct fuse_write_out *out,\n         }\n     }\n\n-    iov[0] = (struct iovec) {\n-        .iov_base = copied,\n-        .iov_len = in_place_size,\n-    };\n-    if (size > FUSE_IN_PLACE_WRITE_BYTES) {\n-        assert(size - FUSE_IN_PLACE_WRITE_BYTES <= FUSE_SPILLOVER_BUF_SIZE);\n-        iov[1] = (struct iovec) {\n-            .iov_base = (void *)spillover_buf,\n-            .iov_len = size - FUSE_IN_PLACE_WRITE_BYTES,\n+    if (in_place_buf) {\n+        iov[0] = (struct iovec) {\n+            .iov_base = copied,\n+            .iov_len = in_place_size,\n         };\n-        qemu_iovec_init_external(&qiov, iov, 2);\n+        if (size > FUSE_IN_PLACE_WRITE_BYTES) {\n+            assert(size - FUSE_IN_PLACE_WRITE_BYTES <= FUSE_SPILLOVER_BUF_SIZE);\n+            iov[1] = (struct iovec) {\n+                .iov_base = (void *)spillover_buf,\n+                .iov_len = size - FUSE_IN_PLACE_WRITE_BYTES,\n+            };\n+            qemu_iovec_init_external(&qiov, iov, 2);\n+        } else {\n+            qemu_iovec_init_external(&qiov, iov, 1);\n+        }\n     } else {\n+        /* fuse over io_uring */\n+        iov[0] = (struct iovec) {\n+            .iov_base = (void *)spillover_buf,\n+            .iov_len = size,\n+        };\n         qemu_iovec_init_external(&qiov, iov, 1);\n     }\n+\n     ret = blk_co_pwritev(exp->common.blk, offset, size, &qiov, 0);\n     if (ret < 0) {\n         goto fail_free_buffer;\n     }\n\n-    qemu_vfree(copied);\n+    if (in_place_buf) {\n+        qemu_vfree(copied);\n+    }\n\n     *out = (struct fuse_write_out) {\n         .size = size,\n@@ -1376,7 +1393,9 @@ fuse_co_write(FuseExport *exp, struct fuse_write_out *out,\n     return sizeof(*out);\n\n fail_free_buffer:\n-    qemu_vfree(copied);\n+    if (in_place_buf) {\n+        qemu_vfree(copied);\n+    }\n     return ret;\n }\n\n",
    "prefixes": [
        "v4",
        "3/7"
    ]
}