get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216772,
    "url": "http://patchwork.ozlabs.org/api/patches/2216772/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260327063330.1312426-1-tytso@mit.edu/",
    "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": "<20260327063330.1312426-1-tytso@mit.edu>",
    "list_archive_url": null,
    "date": "2026-03-27T06:33:30",
    "name": "ext4: always drain queued discard work in ext4_mb_release()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "93d07bfa63e4e925a2a08f6689d5c705e105f47a",
    "submitter": {
        "id": 350,
        "url": "http://patchwork.ozlabs.org/api/people/350/?format=api",
        "name": "Theodore Tso",
        "email": "tytso@mit.edu"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260327063330.1312426-1-tytso@mit.edu/mbox/",
    "series": [
        {
            "id": 497696,
            "url": "http://patchwork.ozlabs.org/api/series/497696/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=497696",
            "date": "2026-03-27T06:33:30",
            "name": "ext4: always drain queued discard work in ext4_mb_release()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497696/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216772/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216772/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=YeO6=B3=vger.kernel.org=linux-ext4+bounces-15478-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\tdkim=pass (2048-bit key;\n unprotected) header.d=mit.edu header.i=@mit.edu header.a=rsa-sha256\n header.s=outgoing header.b=c92hqyGM;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;\n envelope-from=srs0=yeo6=b3=vger.kernel.org=linux-ext4+bounces-15478-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=mit.edu",
            "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=mit.edu header.i=@mit.edu header.a=rsa-sha256\n header.s=outgoing header.b=c92hqyGM;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15478-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu\n header.b=\"c92hqyGM\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=18.9.28.11",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=mit.edu",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=mit.edu"
        ],
        "Received": [
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\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 legolas.ozlabs.org (Postfix) with ESMTPS id 4fhrdq4gvgz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 17:41:35 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhrdq4BdVz4wCX\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 17:41:35 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fhrdq458pz4wSW; Fri, 27 Mar 2026 17:41:35 +1100 (AEDT)",
            "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\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 4fhrdk62Bqz4wCX\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 17:41:30 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 5CE2D315B602\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 06:34:18 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B42193A8FE1;\n\tFri, 27 Mar 2026 06:33:58 +0000 (UTC)",
            "from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\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 3A3AB3AE1A9\n\tfor <linux-ext4@vger.kernel.org>; Fri, 27 Mar 2026 06:33:44 +0000 (UTC)",
            "from trampoline.thunk.org\n (pool-173-48-121-153.bstnma.fios.verizon.net [173.48.121.153])\n\t(authenticated bits=0)\n        (User authenticated as tytso@ATHENA.MIT.EDU)\n\tby outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 62R6XZ3b025991\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tFri, 27 Mar 2026 02:33:36 -0400",
            "by trampoline.thunk.org (Postfix, from userid 15806)\n\tid 632F42E00D6; Fri, 27 Mar 2026 02:33:35 -0400 (EDT)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774593695; cv=pass;\n\tb=VxQNk5Xthuq8bvzqHDunGpS3j6x+HJp1hbOXATr/9qc3w34sSEdnRteILUnpyX1/rcQRoAvju+lPn0lP3FekUXWl+WyV9e/9FxfcfyT/Zujp3teDJ1DvI/G65TYEHSsPIS7xDCAp061cRNTtcS4aLm4NILvVnoa0loxqdW7EmzMNpf2By9WfddRn4h8o7OEdp16neDC8yOy7UT8631qwM+gaBOQUziR0C559VzzinToRNJm0uPquB3Ql2EnQznxgYxrroJwJlC9D6AKed+CPgh2Gsr6LpyzJT+VyraCmxLwN4gdmzUaSs6Zy4d9LpWPYI1gGAw55CQx3TqditdUuLQ==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774593237; cv=none;\n b=BnB3VIx9n04H0j+y6A0BMWP3HXngrpEesaWXgg0IjLc4RzJkzgh2LYhylmU5IF/Vf9eHcC5RBIRJvXifgXR2eLFAXeoAdruFhi5qK9rpHgIySH8/aOloIKHVLeF83DpmXpscTUZdxLBb2jwrzLAeCBtVOxfAUO/g1OPramcjfgs="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774593695; c=relaxed/relaxed;\n\tbh=0OP/VYsVW6QPBdqETjMTwArBOthHJECRnjeZtyC7voo=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=Kx47ayP9nFVZoUX9iZ4vcxMF3LcleleRW9iBDYFJYt7xFCbb4Ox7PPMfSjlLGnQCXY80rjOtsIJu1ByzjgkUunXn6FmavRUpHvWY5xKkmMI0PL+ltq0+yTMbKjPRBY4Qo4Rqk3k0HGzbA9Iez2WOchh9benNf0UITjI2BjavSJ/V3GvudBD8qVxl1fwVqrzybNruSmE0ZHVbT+46mrayv3eYPXFeQQ+jRW0oGY+9R60mPtf0D1Sv0/7usg7Rx/sHc8+8KT05vHQHw7oMZLLV9N51PgvBi66DvHeDf9hhGICzfko0nFHPInqDcXXv/It6Sm7ginOu2TVyz1imM7UNOQ==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774593237; c=relaxed/simple;\n\tbh=zRrk1AUQ/TfIHHKqN/YVp75/3JieHeJf3At99FHlyYw=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=lq3v95YeEsa1BIMJfrwZmv7LU3IWIn2j7kRX+FAk1q7Wf5gWi7COjoBfuVJ4lc3grZX3BbvGmx5On8LiR9XEQs7SieNfwqfNPpuaTyLrWHBc8H0d2F8qwj0RlcBNIf/8UOKEN6MaGtx3Xl6c03UK3lcVtgtC1o+O9UzPNMfhq6k="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=mit.edu; dkim=pass (2048-bit key;\n unprotected) header.d=mit.edu header.i=@mit.edu header.a=rsa-sha256\n header.s=outgoing header.b=c92hqyGM; dkim-atps=neutral;\n spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15478-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=mit.edu;\n spf=pass smtp.mailfrom=mit.edu;\n dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu\n header.b=c92hqyGM; arc=none smtp.client-ip=18.9.28.11"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing;\n\tt=1774593216; bh=0OP/VYsVW6QPBdqETjMTwArBOthHJECRnjeZtyC7voo=;\n\th=From:Subject:Date:Message-ID:MIME-Version;\n\tb=c92hqyGMcEkGV7W8iiRBqU+h+WpUh/OOBkiDPOXNTXuJa+89S/600D6cVmRvQALS5\n\t /xYMxyJe/wIHHhS8cpgku+Rj5qfbdpG5k272C2296asCHLco7AIvPF6qPUhniRw8E2\n\t Ia9P7Nuznuy86AqzTpPutV/z5LoKoiCLaYxCdUtLeG1d3M1gQAOSNwPi4xMYagw9Aw\n\t MWIRlrbWiSE61/0cRuQDTXpcgCsvPRxGHxnSbD3tM8O7w60mE1G3hxQzuboBJUTs2Y\n\t fWkzMb84FvigwudjlBe6T4MxBRnc7VPvd3jlZtDeUUTwEti8NsJmb4/ZohQNK4K7d8\n\t 9CqmYTdSHuhew==",
        "From": "\"Theodore Ts'o\" <tytso@mit.edu>",
        "To": "Ext4 Developers List <linux-ext4@vger.kernel.org>",
        "Cc": "\"Theodore Ts'o\" <tytso@mit.edu>",
        "Subject": "[PATCH] ext4: always drain queued discard work in ext4_mb_release()",
        "Date": "Fri, 27 Mar 2026 02:33:30 -0400",
        "Message-ID": "<20260327063330.1312426-1-tytso@mit.edu>",
        "X-Mailer": "git-send-email 2.51.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-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tHEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,\n\tSPF_PASS autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "While reviewing recent ext4 patch[1], Sashiko raised the following\nconcern[2]:\n\n> If the filesystem is initially mounted with the discard option,\n> deleting files will populate sbi->s_discard_list and queue\n> s_discard_work. If it is then remounted with nodiscard, the\n> EXT4_MOUNT_DISCARD flag is cleared, but the pending s_discard_work is\n> neither cancelled nor flushed.\n\n[1] https://lore.kernel.org/r/20260319094545.19291-1-qiang.zhang@linux.dev/\n[2] https://sashiko.dev/#/patchset/20260319094545.19291-1-qiang.zhang%40linux.dev\n\nThe concern was valid, but it had nothing to do with the patch[1].\nOne of the problems with Sashiko in its current (early) form is that\nit will detect pre-existing issues and report it as a problem with the\npatch that it is reviewing.\n\nIn practice, it would be hard to hit deliberately (unless you are a\nmalicious syzkaller fuzzer), since it would involve mounting the file\nsystem with -o discard, and then deleting a large number of files,\nremounting the file system with -o nodiscard, and then immediately\nunmounting the file system before the queued discard work has a change\nto drain on its own.\n\nFix it because it's a real bug, and to avoid Sashiko from raising this\nconcern when analyzing future patches to mballoc.c.\n\nSigned-off-by: Theodore Ts'o <tytso@mit.edu>\n---\n fs/ext4/mballoc.c | 12 +++++-------\n 1 file changed, 5 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c\nindex cb2bd87c355c..bb58eafb87bc 100644\n--- a/fs/ext4/mballoc.c\n+++ b/fs/ext4/mballoc.c\n@@ -3893,13 +3893,11 @@ void ext4_mb_release(struct super_block *sb)\n \tstruct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits);\n \tint count;\n \n-\tif (test_opt(sb, DISCARD)) {\n-\t\t/*\n-\t\t * wait the discard work to drain all of ext4_free_data\n-\t\t */\n-\t\tflush_work(&sbi->s_discard_work);\n-\t\tWARN_ON_ONCE(!list_empty(&sbi->s_discard_list));\n-\t}\n+\t/*\n+\t * wait the discard work to drain all of ext4_free_data\n+\t */\n+\tflush_work(&sbi->s_discard_work);\n+\tWARN_ON_ONCE(!list_empty(&sbi->s_discard_list));\n \n \tgroup_info = rcu_access_pointer(sbi->s_group_info);\n \tif (group_info) {\n",
    "prefixes": []
}