get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2197754,
    "url": "http://patchwork.ozlabs.org/api/patches/2197754/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218132633.29748-22-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-22-hreitz@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-18T13:26:30",
    "name": "[v4,21/24] fuse: Make shared export state atomic",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "fcd7f985180502f685ccdf62b4baa6bd8c74578e",
    "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-22-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/2197754/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197754/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=OlGT7XtU;\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=stytBGEO;\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 4fGHZR1nFfz1xwr\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 00:35:27 +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 1vshfl-0004Od-Kx; Wed, 18 Feb 2026 08:32:57 -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 1vshfh-0004Hw-3E\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 08:32:53 -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-00064w-0p\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 08:32:52 -0500",
            "from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-590-A9ZZAotrOOORghMIuIAPWA-1; Wed, 18 Feb 2026 08:27:38 -0500",
            "by mail-wm1-f72.google.com with SMTP id\n 5b1f17b1804b1-4837f288194so42109955e9.2\n for <qemu-devel@nongnu.org>; Wed, 18 Feb 2026 05:27:37 -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-48370ac3564sm362444415e9.5.2026.02.18.05.27.34\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 18 Feb 2026 05:27:34 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771421565;\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=eC1GpsxsI4aDAAkTkGGQOGTuPmmj07fAx5eTswWosPE=;\n b=OlGT7XtUsRNEtvKfd2F/5rDRX1GO+rdKGkh/q9p2VesNCjAMc8wiBMcZQQQn/gRsnHZRVH\n TO9OaW5ozcS1FcjwLatoPUn06bgJQOxouoT4gIDSZDmUWMDTVyiHv5H7XKUfxaWbQIGTqR\n ELNZHakvs2XXRX+1KylXBFG2zwmZkiw=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1771421257; x=1772026057; 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=eC1GpsxsI4aDAAkTkGGQOGTuPmmj07fAx5eTswWosPE=;\n b=stytBGEO65PwvMt2foNCp+nVnTiADfmkjdav+su3jB0OdCqoumzr0/u7KeDaMvMHwf\n 3l2+FitUfbDdrsjewzkmqPjs7/YdffnP9Ao76YcQSBpXeAa0BaWTCZDi+n8AzFa9NKYA\n YmhGq/OxhUnc2phke2h5MwwdVirRCi1Q2KcIRLTkqXcbBE7d+H6N6enVrqa0GEGx8C5U\n kWsFiFhqC75ys9k47qJeuSbagHdnDdkIIiiJHG/UA6IgazGBA1uhojIlR39bbxvtBcp5\n GCUYQyCT86SGE0txYuOIgW9WdfWkOMS3wuiSr3airaOy0vtStoKwZeC3BwV6OFQSXOf9\n R6oA=="
        ],
        "X-MC-Unique": "A9ZZAotrOOORghMIuIAPWA-1",
        "X-Mimecast-MFC-AGG-ID": "A9ZZAotrOOORghMIuIAPWA_1771421257",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771421257; x=1772026057;\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=eC1GpsxsI4aDAAkTkGGQOGTuPmmj07fAx5eTswWosPE=;\n b=LUkSGu3wYBknwMF6g79GpfVeFZCG9uky/ha1CDN1XrgI7wSsYX8ofpxQl9mzw96SRC\n sVZXaokm3L4cdl8Du4ktOUaiE7QRAH6FQJGD+TGnaxNaa+7ZotFD/WKP3l9TN/7ovjaz\n MiEoVimrrS1JV/HumXrlGHASEeYiKohnIN/HhGYL95dTXnm4gQ3dKf5HBmq/YEjmHB/f\n IGqS8xccs0Uq1Vaa+BjVUB/bbc9UIHzpqGmvuvWjnaSKSjfuQ7KlqLTMKQRflo2Bqz+q\n 3c6TOZ5o2oZObQUheXuoxJkVmZt7jxh3LDvAGt3IYCrtRjrlNgEeW2bqgR1+wIJQWVep\n EX3g==",
        "X-Gm-Message-State": "AOJu0YxtjjTfp8g87JsK4/tNW4/Nr9E7j5YT3UOmaV/Cd+O8vYT8ZPjF\n Ghnf7MaD9jLIOv27NFqwY8XlT0sCmVfsTebrttaGBs8aC0AbRTWL38pWDfnwRYIiuYwvbJxPlYa\n zMULVwx99MQE3923v7OQh4kO5WZJICeeWEzGV2UzQVaAIJqtCY8TbmNiS",
        "X-Gm-Gg": "AZuq6aKyGW8g+crMaCSXj1uLih6jwhGNjYTHCHwiITjdzaN1hVXSBvaK4hseMYo6oVT\n rQbRPfYP1C5gkjlwIza9Jemd0p4g06JHzFdguqx1ORdfqFLWqaFS6VQFk/1uhfNKA81EQvpqvB6\n wQ0TbjNe2LgmsJADgJL8tGVW17qNqwB3Nax+a12vix3wTKPluxly2HbxP1VoQnGfwOs5B9BKWI5\n SDkEfIYw/WnsoN02v8NN7obuLnTwyU9J1W8ilwz7WG8vzhebdXe0IeceuXBEuRshsDDbtxeZiQX\n EVuZH/1kBDQG08JL6ILX1umnUTSELbvezjfeRswr15JjpgHKtdkYOZcKzqZk5Q4jmUIZpTMNkb+\n xdK6wzbfOhHb+9k0SQcCjPSUrl0rxndMPvLMw1xWIAk9whmkBt7L41mSq1W8B07rr9eVJVVG1Ao\n ZaKG7N",
        "X-Received": [
            "by 2002:a05:600c:620d:b0:480:3bba:1cac with SMTP id\n 5b1f17b1804b1-48371043046mr263552445e9.6.1771421256833;\n Wed, 18 Feb 2026 05:27:36 -0800 (PST)",
            "by 2002:a05:600c:620d:b0:480:3bba:1cac with SMTP id\n 5b1f17b1804b1-48371043046mr263552055e9.6.1771421256341;\n Wed, 18 Feb 2026 05:27:36 -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 21/24] fuse: Make shared export state atomic",
        "Date": "Wed, 18 Feb 2026 14:26:30 +0100",
        "Message-ID": "<20260218132633.29748-22-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, 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 next commit is going to allow multi-threaded access to a FUSE\nexport.  In order to allow safe concurrent SETATTR operations that\ncan modify the shared st_mode, st_uid, and st_gid, make any access to\nthose fields atomic operations.\n\nSigned-off-by: Hanna Czenczek <hreitz@redhat.com>\n---\n block/export/fuse.c | 23 +++++++++++++----------\n 1 file changed, 13 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/block/export/fuse.c b/block/export/fuse.c\nindex aa4f1c0307..162cbdacfc 100644\n--- a/block/export/fuse.c\n+++ b/block/export/fuse.c\n@@ -157,6 +157,7 @@ typedef struct FuseExport {\n     /* Whether allow_other was used as a mount option or not */\n     bool allow_other;\n \n+    /* All atomic */\n     mode_t st_mode;\n     uid_t st_uid;\n     gid_t st_gid;\n@@ -267,6 +268,7 @@ static int fuse_export_create(BlockExport *blk_exp,\n     ERRP_GUARD(); /* ensure clean-up even with error_fatal */\n     FuseExport *exp = container_of(blk_exp, FuseExport, common);\n     BlockExportOptionsFuse *args = &blk_exp_args->u.fuse;\n+    uint32_t st_mode;\n     int ret;\n \n     assert(blk_exp_args->type == BLOCK_EXPORT_TYPE_FUSE);\n@@ -335,12 +337,13 @@ static int fuse_export_create(BlockExport *blk_exp,\n         args->allow_other = FUSE_EXPORT_ALLOW_OTHER_AUTO;\n     }\n \n-    exp->st_mode = S_IFREG | S_IRUSR;\n+    st_mode = S_IFREG | S_IRUSR;\n     if (exp->writable) {\n-        exp->st_mode |= S_IWUSR;\n+        st_mode |= S_IWUSR;\n     }\n-    exp->st_uid = getuid();\n-    exp->st_gid = getgid();\n+    qatomic_set(&exp->st_mode, st_mode);\n+    qatomic_set(&exp->st_uid, getuid());\n+    qatomic_set(&exp->st_gid, getgid());\n \n     if (args->allow_other == FUSE_EXPORT_ALLOW_OTHER_AUTO) {\n         /* Try allow_other == true first, ignore errors */\n@@ -818,10 +821,10 @@ fuse_co_getattr(FuseExport *exp, struct fuse_attr_out *out)\n         .attr_valid = 1,\n         .attr = {\n             .ino        = 1,\n-            .mode       = exp->st_mode,\n+            .mode       = qatomic_read(&exp->st_mode),\n             .nlink      = 1,\n-            .uid        = exp->st_uid,\n-            .gid        = exp->st_gid,\n+            .uid        = qatomic_read(&exp->st_uid),\n+            .gid        = qatomic_read(&exp->st_gid),\n             .size       = length,\n             .blksize    = blk_bs(exp->common.blk)->bl.request_alignment,\n             .blocks     = allocated_blocks,\n@@ -934,15 +937,15 @@ fuse_co_setattr(FuseExport *exp, struct fuse_attr_out *out, uint32_t to_set,\n \n     if (to_set & FATTR_MODE) {\n         /* Ignore FUSE-supplied file type, only change the mode */\n-        exp->st_mode = (mode & 07777) | S_IFREG;\n+        qatomic_set(&exp->st_mode, (mode & 07777) | S_IFREG);\n     }\n \n     if (to_set & FATTR_UID) {\n-        exp->st_uid = uid;\n+        qatomic_set(&exp->st_uid, uid);\n     }\n \n     if (to_set & FATTR_GID) {\n-        exp->st_gid = gid;\n+        qatomic_set(&exp->st_gid, gid);\n     }\n \n     return fuse_co_getattr(exp, out);\n",
    "prefixes": [
        "v4",
        "21/24"
    ]
}