get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216202,
    "url": "http://patchwork.ozlabs.org/api/patches/2216202/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260326045834.1175822-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": "<20260326045834.1175822-1-tytso@mit.edu>",
    "list_archive_url": null,
    "date": "2026-03-26T04:58:34",
    "name": "[-v2] ext4: handle wraparound when searching for blocks for indirect mapped blocks",
    "commit_ref": null,
    "pull_url": null,
    "state": "awaiting-upstream",
    "archived": false,
    "hash": "fe44bd08d019c193e7ae9d8479f7bb0c359829d5",
    "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/20260326045834.1175822-1-tytso@mit.edu/mbox/",
    "series": [
        {
            "id": 497534,
            "url": "http://patchwork.ozlabs.org/api/series/497534/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=497534",
            "date": "2026-03-26T04:58:34",
            "name": "[-v2] ext4: handle wraparound when searching for blocks for indirect mapped blocks",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497534/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216202/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216202/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=Aua2=B2=vger.kernel.org=linux-ext4+bounces-15387-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=fPT4lTkU;\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=aua2=b2=vger.kernel.org=linux-ext4+bounces-15387-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c04:e001:36c::12fc:5321\"\n 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=fPT4lTkU;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15387-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=\"fPT4lTkU\"",
            "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 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 4fhBQR2cfbz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 15:59:26 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhBQP60dlz4wD7\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 15:59:25 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fhBQP5k9bz4wM6; Thu, 26 Mar 2026 15:59:25 +1100 (AEDT)",
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\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 4fhBQK5NM0z4wD7\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 15:59:21 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 6469E3029C1F\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 04:59:05 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 916EE34EF12;\n\tThu, 26 Mar 2026 04:59:02 +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 5D293344D91\n\tfor <linux-ext4@vger.kernel.org>; Thu, 26 Mar 2026 04:58:50 +0000 (UTC)",
            "from trampoline.thunk.org (pool-173-48-82-49.bstnma.fios.verizon.net\n [173.48.82.49])\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 62Q4wdPD028233\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 26 Mar 2026 00:58:40 -0400",
            "by trampoline.thunk.org (Postfix, from userid 15806)\n\tid 5FBD22E00D6; Thu, 26 Mar 2026 00:58:39 -0400 (EDT)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774501165; cv=pass;\n\tb=B+UWV6UmazpqQDayOqIVJjXMpodYlGxzvESc9HdRMnxqj6yoJVDYyKy7tlcc9vPR0AL/XAanuomAQcAXSQuzrDOsl9QTWzL0C8IcN2dVAmOFeB9zWzrDtxmuivh4m+XjGEkJyAQs0NUGkV3faiOrw4tHCFNjpiNckqTZdkqCKIgLfunEjSfvzxFhPGXGWVXvvLCsIcrlXUyF7iP+Rm515+tW+gJ51QE8SSmHzKko65wk3dKchW7CyVa/6KmFdr8CyTIr6bM1IGzoGJYco9w2Vert+BvL3mG9wh74CbdECmxTLlnMaVQhadSnbaznv/+6Rst5tC7zUEjNk+vMIFN5/Q==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774501141; cv=none;\n b=NeUUOksoG/uFi1gAms/l3yRfw2MYmti1R2SLkGoG+EtK4EDh+aV8Tcs+ePORJPIcgJaGWve/Ga1Uf19y32n9tgIPsZMvH9flmM9rVWMawUknUUP18A7digcG/5Em6xM1/5diFsjrReZGCIhh/a78YYZQtU8zckUIDa1xz2dV4cs="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774501165; c=relaxed/relaxed;\n\tbh=egKqHTesdGfdY0/Gnd7vq1Ungvvo7iWfU84mdR64Sa0=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=WO8jwuSlHj/l4iTOOee2ZWfMaGdBEgfnHbOJ7JdQ9ViK0RQ8mn8yZMzL4h6LCmN6++Y2rYEdgelmSEUN64htE5RMjiwq29DftVOH4Bwx/V5ZJhVhL/LmwVOHhFEKXUELl207ce7UWHhmBbY3p4FM4V9D5iOmz3dGymIkc9mOO+j/q2Q0k3ungLZvMQjqHIPe680abl7RjpbHYUnm+uUikW6hLZaU6+qLSBtdV3YaAwEdIClvPjLkc8Uz+9/Wmdh3l5TLLxymEW2M0JOO4mq/PbP/UHZYyZO4RyA72appNMUGcrA9a9tx+Zb89qehpZwm0nneZy6perXMrsQVLAzIQg==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774501141; c=relaxed/simple;\n\tbh=pVLm3wyomm0JxZ2OcXvlagzyLKYA2/ATLisfqGP0cJY=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=B1ej8OzMFiTUtAEYbo2UEb3ppcI63RxqBBqnPZ/r65ud/y9V/S4Pa3MkMYxv6O3JpSbvueMzEm9wdQ/XcStEiKnYhbhiF7BQ38VNckz5dzln4SukKLym9YWmS/wCZFKDHRSysm65r9S0R5U0gy873u43uEHR61hDZlExqL+kCoY="
        ],
        "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=fPT4lTkU; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15387-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=fPT4lTkU; 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=1774501121; bh=egKqHTesdGfdY0/Gnd7vq1Ungvvo7iWfU84mdR64Sa0=;\n\th=From:Subject:Date:Message-ID:MIME-Version;\n\tb=fPT4lTkU7se14rlPj3720rdZeGw/MUQT3HE7bokASROf5ALTCw8OOPx2V1UsnNdFe\n\t qRm+bC4/RbPJwQIW02wKnhWwgtxnJEQnNnjtZ06vjZCXO4tfGnc4mvnYouj38pSK2i\n\t r3ewK1iGxAGXXUGdQd2fdru8C6vyu17lw2yI8oUhmfGprCncqZlqUqnsmN5wwimcgU\n\t jV0W3d9v+NQ+09fvLg6NwF4TXqtl3RH9ybGTjwFJvoA9VECMjk6kLxpQXRZZQmo6RQ\n\t V0GbRRpU/xnW9GCYdzq9zOYHf9s4FgGrqK+g4BzmkqzQZlqF4vvmhGJCzap1GJ/9Fp\n\t +O81s7O3I5W9Q==",
        "From": "\"Theodore Ts'o\" <tytso@mit.edu>",
        "To": "Ext4 Developers List <linux-ext4@vger.kernel.org>",
        "Cc": "\"Theodore Ts'o\" <tytso@mit.edu>, Jan Kara <jack@suse.cz>",
        "Subject": "[PATCH -v2] ext4: handle wraparound when searching for blocks for\n indirect mapped blocks",
        "Date": "Thu, 26 Mar 2026 00:58:34 -0400",
        "Message-ID": "<20260326045834.1175822-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": "Commit 4865c768b563 (\"ext4: always allocate blocks only from groups\ninode can use\") restricts what blocks will be allocated for indirect\nblock based files to block numbers that fit within 32-bit block\nnumbers.\n\nHowever, when using a review bot running on the latest Gemini LLM to\ncheck this commit when backporting into an LTS based kernel, it raised\nthis concern:\n\n   If ac->ac_g_ex.fe_group is >= ngroups (for instance, if the goal\n   group was populated via stream allocation from s_mb_last_groups),\n   then start will be >= ngroups.\n\n   Does this allow allocating blocks beyond the 32-bit limit for\n   indirect block mapped files? The commit message mentions that\n   ext4_mb_scan_groups_linear() takes care to not select unsupported\n   groups. However, its loop uses group = *start, and the very first\n   iteration will call ext4_mb_scan_group() with this unsupported\n   group because next_linear_group() is only called at the end of the\n   iteration.\n\nAfter reviewing the code paths involved and considering the LLM\nreview, I determined that this can happen when there is a file system\nwhere some files/directories are extent-mapped and others are\nindirect-block mapped.  To address this, add a safety clamp in\next4_mb_scan_groups().\n\nFixes: 4865c768b563 (\"ext4: always allocate blocks only from groups inode can use\")\nSigned-off-by: Theodore Ts'o <tytso@mit.edu>\nCc: Jan Kara <jack@suse.cz>\n---\nv2:\n  * Remove extra checks that were not needed once we add the clamp\n    in ext4_mb_scan_groups().\n\n fs/ext4/mballoc.c | 2 ++\n 1 file changed, 2 insertions(+)",
    "diff": "diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c\nindex 20e9fdaf4301..b10db5d7545b 100644\n--- a/fs/ext4/mballoc.c\n+++ b/fs/ext4/mballoc.c\n@@ -1199,6 +1199,8 @@ static int ext4_mb_scan_groups(struct ext4_allocation_context *ac)\n \n \t/* searching for the right group start from the goal value specified */\n \tstart = ac->ac_g_ex.fe_group;\n+\tif (start >= ngroups)\n+\t\tstart = 0;\n \tac->ac_prefetch_grp = start;\n \tac->ac_prefetch_nr = 0;\n \n",
    "prefixes": [
        "-v2"
    ]
}