get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227842,
    "url": "http://patchwork.ozlabs.org/api/patches/2227842/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260424104201.1930823-1-yi.zhang@huaweicloud.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api",
        "name": "Linux ext4 filesystem development",
        "link_name": "linux-ext4",
        "list_id": "linux-ext4.vger.kernel.org",
        "list_email": "linux-ext4@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260424104201.1930823-1-yi.zhang@huaweicloud.com>",
    "list_archive_url": null,
    "date": "2026-04-24T10:42:01",
    "name": "ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode data writeback",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "96f614f5386bc49e967a50a8704b650c438409e1",
    "submitter": {
        "id": 85428,
        "url": "http://patchwork.ozlabs.org/api/people/85428/?format=api",
        "name": "Zhang Yi",
        "email": "yi.zhang@huaweicloud.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260424104201.1930823-1-yi.zhang@huaweicloud.com/mbox/",
    "series": [
        {
            "id": 501345,
            "url": "http://patchwork.ozlabs.org/api/series/501345/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=501345",
            "date": "2026-04-24T10:42:01",
            "name": "ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode data writeback",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501345/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227842/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227842/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=yzO5=CX=vger.kernel.org=linux-ext4+bounces-16076-patchwork-incoming=ozlabs.org@ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-ext4@vger.kernel.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "patchwork-incoming@ozlabs.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=yzo5=cx=vger.kernel.org=linux-ext4+bounces-16076-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=104.64.211.4 arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16076-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=45.249.212.51",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huaweicloud.com"
        ],
        "Received": [
            "from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g28pd130Bz1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 20:49:11 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g28pb021Yz4wC6\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 20:49:10 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4g28pZ6q6qz4wCm; Fri, 24 Apr 2026 20:49:10 +1000 (AEST)",
            "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4g28pV4RkZz4wC6\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 24 Apr 2026 20:49:06 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 3046430095F0\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 24 Apr 2026 10:48:42 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B4105396B96;\n\tFri, 24 Apr 2026 10:48:33 +0000 (UTC)",
            "from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com\n [45.249.212.51])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 4074738B12B;\n\tFri, 24 Apr 2026 10:48:28 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.198])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4g28mW30tnzYQvHD;\n\tFri, 24 Apr 2026 18:47:23 +0800 (CST)",
            "from mail02.huawei.com (unknown [10.116.40.252])\n\tby mail.maildlp.com (Postfix) with ESMTP id 9AA9840573;\n\tFri, 24 Apr 2026 18:48:24 +0800 (CST)",
            "from huaweicloud.com (unknown [10.50.85.155])\n\tby APP3 (Coremail) with SMTP id _Ch0CgC3ZL5uSutpM1IvBg--.55362S4;\n\tFri, 24 Apr 2026 18:48:22 +0800 (CST)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1777027750; cv=pass;\n\tb=UOqG5xwGd7YXg/zmiZI9rovxkHFMQ/0Fd8atyADMQFkRqSkBsSHRYtd7Dht+C9xa2p3gUJ5cyZDHE4bcMC33gGrscU/r0unwKAUk9ZloJhN0HhdfHn5tLsMfNLvAHdb66ssWD5kMHyoGF2f97ev48jqNO81UZqLR4HtiHMfObWxwKR51DJn/cdOqP6CKsm/MCWqEt7amB9M90znYwGFP8xwgzKuCI9t7HkLrqrlcc0j7vIz6Opb1TqI6dJoGXiaxYCh0ApgS6pewr9Xqh2h7YRyAy01jtL4zsuD80G7WUBy3nFDdp40sg6g45G0T49tlmLUveIrkP7/C/uEwwpmq1Q==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777027713; cv=none;\n b=MRYfyUXElzqA+N2BhhL3TfHjiMUSFwre8PW1Zk0eAaJljhQatS2bJ1lvodpHDB4EFCBT0v/RN+l28FvKO4rmMLzjDdHf01n+EzGfDwa39l+LhEEYv2P30TyX6jLlo8Me/G1sab6W04WBHEq4AzGwu40nmnWbUT0r3jA9GPPmnGg="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1777027750; c=relaxed/relaxed;\n\tbh=Rb3RJNt9RzJYple6I+7n+flE7dxDnu2fY7pWlxzqkfM=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=gqhEQr2kFoTcvJy+ZzD/THiOYCi955+PzJPYCWgTYTSaYDlcc/+nO1bkiMYG/fzuJZTKd/k7osyxmmyPg5uEwXAelNCjuaVwTDlAgdnZcPHDJa8fGiHRd8Qfc9Pt4canazEKCOh+OkgXeYLIQ/Pgpaeih6emucB0kaL5UlUDILPeto7mspBmMmq/2/rFJOxylaFpBdKeqcGyErE83g+qcjWKguI2aMSTvltpj/G91EpPnCjw5ewV3QkuGdhSyauZA4pzC7cgtfnvmhKrdqSpuP3QpkEBYGC+W3GCdI8hLX+lIVdDgMluD+pBZJSTt4W8Zun9vlCVQtd4PAuT/sqXdg==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777027713; c=relaxed/simple;\n\tbh=6CbsLRcrbTHKaxJhYojnw+b1Dwgvvj+npSygMMFvt8s=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=Xuj9q3yP6cb1W7KSihBzTC+b3YrOkAfkVrnri03O6dqTLAC189sczUtflc4tXRAri4Tq5kt/q3RCZIbClwSNpPCJROun0Ce/MVAYWvr8eazUgWF6pr7ARsYbhpCppKeY065g9uaAQnrQAt+8cZ243cDoKzc8Y6OTxp4/8HOwxmM="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16076-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51"
        ],
        "From": "Zhang Yi <yi.zhang@huaweicloud.com>",
        "To": "linux-ext4@vger.kernel.org",
        "Cc": "linux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tlibaokun@linux.alibaba.com,\n\tjack@suse.cz,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tyi.zhang@huawei.com,\n\tyi.zhang@huaweicloud.com,\n\tyizhang089@gmail.com,\n\tyangerkun@huawei.com,\n\tyukuai@fnnas.com",
        "Subject": "[PATCH] ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode\n data writeback",
        "Date": "Fri, 24 Apr 2026 18:42:01 +0800",
        "Message-ID": "<20260424104201.1930823-1-yi.zhang@huaweicloud.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-ext4@vger.kernel.org",
        "List-Id": "<linux-ext4.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "_Ch0CgC3ZL5uSutpM1IvBg--.55362S4",
        "X-Coremail-Antispam": "1UD129KBjvJXoW7ZFWDZF13urWrXr1xAF1UJrb_yoW8Kw4xpr\n\tW8Ca42qr409r1xuFs7Wa17JFyjgw10y3yUJry3C3Z0g3y3Zr1xGrWIgFyaqF1UK392gayF\n\tqF4I934UKas0kFDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUU9014x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02\n\t1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j\n\t6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV\n\tCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0\n\tI7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r\n\t4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v\n\tn2kIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7x\n\tkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E\n\t67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw\n\tCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1x\n\tMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIda\n\tVFxhVjvjDU0xZFpf9x0JUpwZcUUUUU=",
        "X-CM-SenderInfo": "d1lo6xhdqjqx5xdzvxpfor3voofrz/",
        "X-Spam-Status": "No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "From: Zhang Yi <yi.zhang@huawei.com>\n\nIn EXT4_GOING_FLAGS_LOGFLUSH mode, the EXT4_FLAGS_SHUTDOWN flag was set\nbefore calling ext4_force_commit().  This caused ordered-mode data\nwriteback (triggered by journal commit) to fail with -EIO, since\next4_do_writepages() checks for the shutdown flag.  The journal would\nthen be aborted prematurely before the commit could succeed.\n\nFix this by calling ext4_force_commit() first, then setting the\nshutdown flag, so that pending data can be written back correctly.\n\nNote that moving ext4_force_commit() before setting the shutdown flag\ncreates a small window in which new writes may occur and generate new\njournal transactions.  When the journal is subsequently aborted, the\nnew transactions will not be able to write to disk.  This is intentional\nbecause LOGFLUSH's semantics are to flush pre-existing journal entries\nbefore shutdown, not to guarantee atomicity for writes that race with\nthe ioctl.\n\nFixes: 783d94854499 (\"ext4: add EXT4_IOC_GOINGDOWN ioctl\")\nSigned-off-by: Zhang Yi <yi.zhang@huawei.com>\n---\nThis fix addresses my new generic/970 test, which fails during the file\nsize verification after shutdown and remount.\n\n https://lore.kernel.org/fstests/20260424092228.1396658-1-yi.zhang@huaweicloud.com/\n\n fs/ext4/ioctl.c | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c\nindex 1d0c3d4bdf47..110e3fb194ec 100644\n--- a/fs/ext4/ioctl.c\n+++ b/fs/ext4/ioctl.c\n@@ -830,11 +830,17 @@ int ext4_force_shutdown(struct super_block *sb, u32 flags)\n \t\tbdev_thaw(sb->s_bdev);\n \t\tbreak;\n \tcase EXT4_GOING_FLAGS_LOGFLUSH:\n+\t\t/*\n+\t\t * Call ext4_force_commit() before setting EXT4_FLAGS_SHUTDOWN.\n+\t\t * This is because in data=ordered mode, journal commit\n+\t\t * triggers data writeback which fails if shutdown is already\n+\t\t * set, causing the journal to be aborted prematurely before\n+\t\t * the commit succeeds.\n+\t\t */\n+\t\t(void) ext4_force_commit(sb);\n \t\tset_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);\n-\t\tif (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) {\n-\t\t\t(void) ext4_force_commit(sb);\n+\t\tif (sbi->s_journal && !is_journal_aborted(sbi->s_journal))\n \t\t\tjbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);\n-\t\t}\n \t\tbreak;\n \tcase EXT4_GOING_FLAGS_NOLOGFLUSH:\n \t\tset_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);\n",
    "prefixes": []
}