get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2197760,
    "url": "http://patchwork.ozlabs.org/api/patches/2197760/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218132633.29748-12-hreitz@redhat.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": "<20260218132633.29748-12-hreitz@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-18T13:26:20",
    "name": "[v4,11/24] fuse: Add halted flag",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6c127e2ffc4a8d1bde73b42f2831f893a940e539",
    "submitter": {
        "id": 82279,
        "url": "http://patchwork.ozlabs.org/api/people/82279/?format=api",
        "name": "Hanna Czenczek",
        "email": "hreitz@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218132633.29748-12-hreitz@redhat.com/mbox/",
    "series": [
        {
            "id": 492547,
            "url": "http://patchwork.ozlabs.org/api/series/492547/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492547",
            "date": "2026-02-18T13:26:09",
            "name": "export/fuse: Use coroutines and multi-threading",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/492547/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2197760/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197760/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=B4e19W4L;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=i4VJKYB+;\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 4fGHbH2SWkz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 00:36:11 +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 1vshfg-0004GD-1O; Wed, 18 Feb 2026 08:32:52 -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 <hreitz@redhat.com>) id 1vshfR-0003yL-0h\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 08:32:37 -0500",
            "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <hreitz@redhat.com>) id 1vshfA-0005Qz-IQ\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 08:32:32 -0500",
            "from mail-wr1-f72.google.com (mail-wr1-f72.google.com\n [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-65-vKyX8TPaOHWtsN-7ejbBAA-1; Wed, 18 Feb 2026 08:27:13 -0500",
            "by mail-wr1-f72.google.com with SMTP id\n ffacd0b85a97d-4362456500eso5072697f8f.3\n for <qemu-devel@nongnu.org>; Wed, 18 Feb 2026 05:27:12 -0800 (PST)",
            "from localhost\n (p200300cfd737d029edef7b8da7441ac2.dip0.t-ipconnect.de.\n [2003:cf:d737:d029:edef:7b8d:a744:1ac2])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-483983c0766sm29540755e9.5.2026.02.18.05.27.09\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 18 Feb 2026 05:27:09 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771421538;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=HZlCiaeoLEleGjH47/mJTlqebumMXTgkps2WXMv7tSY=;\n b=B4e19W4LDmUPnXSZ8c+X8u4tZRD0vzkKraQjCJ02ahzIrQhljRPGXj4lR+WuW5G+V9YMly\n Omm6zbAh6JLxI2LVZLRlU/wGnlhJ/VlU2hJ94tj4FjG3UAc//H7m8xOKwuT58irpHjZ9fL\n 1B4BrgcLMnnNHtLnRVYPMUKp3H01r68=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1771421232; x=1772026032; 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=HZlCiaeoLEleGjH47/mJTlqebumMXTgkps2WXMv7tSY=;\n b=i4VJKYB+b09pTDUbHYrKS4iaIfwWkYEfBjoS9kjRIOru6DBC/g4g7gdBZM8Ap62l9Q\n eCkX1pdiBoSQljWCPcqdy3UPjSbRN9BrREWdtJA/KTB0aSN84pZ3n2N07sSTeTLVaPCo\n y1UgJW6h3OkD3oGElgUMt0weB+iQc1CXUgBCUik657QsAF2kBoo9/Pm8s2EIWqjK95u7\n FjhSfSSKyu96meENqaM8sRDuQUK2XRuj1R4K7KWu9fjohaX41FtnKqa+bFrOpPuTqAZ5\n X5PAL6vPJ4FE4ZfnuHUBWxmp0r3/0viZydYGfteFxxSEeq5R7SIr9hSY64wRG76R7IzT\n A8FQ=="
        ],
        "X-MC-Unique": "vKyX8TPaOHWtsN-7ejbBAA-1",
        "X-Mimecast-MFC-AGG-ID": "vKyX8TPaOHWtsN-7ejbBAA_1771421232",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771421232; x=1772026032;\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=HZlCiaeoLEleGjH47/mJTlqebumMXTgkps2WXMv7tSY=;\n b=L1L+tgDinDa7fkecH/UjlQyFqWF/fAweIZgMECeMaLoOh5fNq/MxGnlhx+5GScPxTL\n 0bZ4FbSTTEk6tZJy0dhjEYvnJ3+e3uom8+3h26PP2WPkMIabPpSUyR3BtbyWYicE2lag\n hVBxcByL1B6/9w8RTDu4Ee2IquxxD/DurrbnIlaad1fN0iCQgU/chREoeG0p4cf9t3Sh\n 5OZppQMpdocZbv4bAq4N/Af0TDlMyQkK4NwavxG28/mfM1sS7gGy4tAiHOHe9Cr0Ce1r\n oJbKBg3UZm8MhGTcH+Cx7VGnSXSvt5deFG8RtksFa+kfsvTLbdt29aDJk/5O9HZGAVZp\n u87w==",
        "X-Gm-Message-State": "AOJu0Yzn+crILb+k0uL5tzNqb3Od79sOra7ftOCq2zBkH7gnrSk53ZL8\n YHNYQwuoT4FEGtkj4mPnZE4ga4XBeWIXS4Bab95Jz8Gk9lGYqwLcscmIqrUqS7csXSGkqGcgaOx\n TQ969366bhY8UJ665vXi6rOuN4OUTqtToFAlpkhka0wAMgPmagZRbvHTQ",
        "X-Gm-Gg": "AZuq6aI2OFxs+qJ88p9+TzerzMpLhjksfUtJdyxATlflAKYY11/Co4dwyh7K8moS1aW\n M49v7DVyZ72DB5zPesGLb+xxX/0aQn2V5JvkeRH+NM7XS5AEkDioVqiRLPW9aZKYuUAo9f6v6OR\n aUN007UEXflXsnbapOaYza3xo8NVGV0A/k2qCxZfZZ8RC4aElsF13jDpqTJ8H/qVyUVEB6oTlLG\n u7gQr2cvuf1jBrXk/q4aKSmIkUjjR+KPEAFWDlFFbBr91t9+CTN9hia5J3bQvxjQmWp5YFElPtw\n JMCNvG9/LpMdIzYcEy/WWyMx8LYXX+kxoJDKtgXybiJxQYKYRXDRs7aTr/uy7IsBxIy1UJZqZSI\n YvaKDl+KlwqlzKnOZTxmG9mA4LYwZ7vH6FmWAZE4ERLaxlTRJ1ws3LbbJIHvRIejY/m4xbjjiGk\n 3MEaWF",
        "X-Received": [
            "by 2002:a05:600c:c4a5:b0:480:19ed:7efa with SMTP id\n 5b1f17b1804b1-48398b8522fmr25131105e9.36.1771421231753;\n Wed, 18 Feb 2026 05:27:11 -0800 (PST)",
            "by 2002:a05:600c:c4a5:b0:480:19ed:7efa with SMTP id\n 5b1f17b1804b1-48398b8522fmr25130845e9.36.1771421231286;\n Wed, 18 Feb 2026 05:27:11 -0800 (PST)"
        ],
        "From": "Hanna Czenczek <hreitz@redhat.com>",
        "To": "qemu-block@nongnu.org",
        "Cc": "qemu-devel@nongnu.org, Hanna Czenczek <hreitz@redhat.com>,\n Kevin Wolf <kwolf@redhat.com>, Brian Song <hibriansong@gmail.com>",
        "Subject": "[PATCH v4 11/24] fuse: Add halted flag",
        "Date": "Wed, 18 Feb 2026 14:26:20 +0100",
        "Message-ID": "<20260218132633.29748-12-hreitz@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260218132633.29748-1-hreitz@redhat.com>",
        "References": "<20260218132633.29748-1-hreitz@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.129.124; envelope-from=hreitz@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.043,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=unavailable 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": "This is a flag that we will want when processing FUSE requests\nourselves: When the kernel sends us e.g. a truncated request (i.e. we\nreceive less data than the request's indicated length), we cannot rely\non subsequent data to be valid.  Then, we are going to set this flag,\nhalting all FUSE request processing.\n\nWe plan to only use this flag in cases that would effectively be kernel\nbugs.\n\nWhile not necessary yet, access the flag atomically so that it will be\nsafe to use once we introduce multi-threading.\n\n(Right now, the flag is unused because libfuse still does our request\nprocessing.)\n\nSigned-off-by: Hanna Czenczek <hreitz@redhat.com>\n---\n block/export/fuse.c | 30 ++++++++++++++++++++++++++++++\n 1 file changed, 30 insertions(+)",
    "diff": "diff --git a/block/export/fuse.c b/block/export/fuse.c\nindex fc75a5e74d..f6a5f4fa0a 100644\n--- a/block/export/fuse.c\n+++ b/block/export/fuse.c\n@@ -53,6 +53,13 @@ typedef struct FuseExport {\n     unsigned int in_flight; /* atomic */\n     bool mounted, fd_handler_set_up;\n \n+    /*\n+     * Set when there was an unrecoverable error and no requests should be read\n+     * from the device anymore (basically only in case of something we would\n+     * consider a kernel bug).  Access atomically.\n+     */\n+    bool halted;\n+\n     char *mountpoint;\n     bool writable;\n     bool growable;\n@@ -69,6 +76,7 @@ static const struct fuse_lowlevel_ops fuse_ops;\n \n static void fuse_export_shutdown(BlockExport *exp);\n static void fuse_export_delete(BlockExport *exp);\n+static void fuse_export_halt(FuseExport *exp) G_GNUC_UNUSED;\n \n static void init_exports_table(void);\n \n@@ -99,6 +107,10 @@ static void fuse_dec_in_flight(FuseExport *exp)\n \n static void fuse_attach_handlers(FuseExport *exp)\n {\n+    if (qatomic_read(&exp->halted)) {\n+        return;\n+    }\n+\n     aio_set_fd_handler(exp->common.ctx,\n                        fuse_session_fd(exp->fuse_session),\n                        read_from_fuse_export, NULL, NULL, NULL, exp);\n@@ -322,6 +334,10 @@ static void read_from_fuse_export(void *opaque)\n     FuseExport *exp = opaque;\n     int ret;\n \n+    if (unlikely(qatomic_read(&exp->halted))) {\n+        return;\n+    }\n+\n     fuse_inc_in_flight(exp);\n \n     do {\n@@ -380,6 +396,20 @@ static void fuse_export_delete(BlockExport *blk_exp)\n     g_free(exp->mountpoint);\n }\n \n+/**\n+ * Halt the export: Detach FD handlers, and set exp->halted to true, preventing\n+ * fuse_attach_handlers() from re-attaching them, therefore stopping all further\n+ * request processing.\n+ *\n+ * Call this function when an unrecoverable error happens that makes processing\n+ * all future requests unreliable.\n+ */\n+static void fuse_export_halt(FuseExport *exp)\n+{\n+    qatomic_set(&exp->halted, true);\n+    fuse_detach_handlers(exp);\n+}\n+\n /**\n  * Check whether @path points to a regular file.  If not, put an\n  * appropriate message into *errp.\n",
    "prefixes": [
        "v4",
        "11/24"
    ]
}