get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2234992,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234992/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508121539.4174601-8-libaokun@linux.alibaba.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260508121539.4174601-8-libaokun@linux.alibaba.com>",
    "list_archive_url": null,
    "date": "2026-05-08T12:15:29",
    "name": "[RFC,07/17] ext4: use fast incremental CRC update in ext4_mb_mark_context()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ea62cafac0978b3e70c976692692b9890cbdb836",
    "submitter": {
        "id": 92757,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/92757/?format=api",
        "name": "Baokun Li",
        "email": "libaokun@linux.alibaba.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508121539.4174601-8-libaokun@linux.alibaba.com/mbox/",
    "series": [
        {
            "id": 503377,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503377/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=503377",
            "date": "2026-05-08T12:15:22",
            "name": "ext4/lib-crc: LBS performance part 1 - incremental CRC32c for bitmap checksums",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/503377/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2234992/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2234992/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=cB42=DF=vger.kernel.org=linux-ext4+bounces-16370-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 (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=oBslsgyw;\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=cb42=df=vger.kernel.org=linux-ext4+bounces-16370-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c0a:e001:db::12fc:5321\"\n arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.alibaba.com",
            "gandalf.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=oBslsgyw;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16370-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.alibaba.com\n header.i=@linux.alibaba.com header.b=\"oBslsgyw\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=115.124.30.111",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.alibaba.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.alibaba.com"
        ],
        "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 4gBpBt3MFHz1yKd\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 22:21:42 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4gBpBt2xcdz4wJS\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 22:21:42 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4gBpBt2vLxz4wJg; Fri, 08 May 2026 22:21:42 +1000 (AEST)",
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::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 4gBpBp54x5z4wJS\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 08 May 2026 22:21:38 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 2479130A4DAD\n\tfor <patchwork-incoming@ozlabs.org>; Fri,  8 May 2026 12:16:18 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0ED85363C6C;\n\tFri,  8 May 2026 12:16:17 +0000 (UTC)",
            "from out30-111.freemail.mail.aliyun.com\n (out30-111.freemail.mail.aliyun.com [115.124.30.111])\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 1929C37F00A;\n\tFri,  8 May 2026 12:16:13 +0000 (UTC)",
            "from\n x31h02109.sqa.na131.tbsite.net(mailfrom:libaokun@linux.alibaba.com\n fp:SMTPD_---0X2XQgpZ_1778242564 cluster:ay36)\n          by smtp.aliyun-inc.com;\n          Fri, 08 May 2026 20:16:04 +0800"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1778242902; cv=pass;\n\tb=o5iNBuGV1nGE6IjWZUFrqarQG/EaoxGAzgXcBhxf2Fb3xZnwIuIE6O8kOQilrHMy3wuJVjtRC1y7zsPn6fYu40qzwE6+zRPoAO7OeKhXNu/3t6kwpNrZnn154zcmquHdsnlfC1vkmTr+ODL5LxaNhDRaBAtTbSoTDFbrLjz+e5O+SHU4nnnEzzXS7Oj+AAxYkfOX73Nimnd4+iL6QQKxbEiHifzx0CS9LCx8pB+NbvgU5N8/ukx7jaOqyJY1XvWoqbGFGps7QEUd4xQtLeegxgxGvlHOEAk5XjznxbIO4rFhN5hAMLBdAJSFCZcMiL1rKFR3Qoi+txUElhIKLC4xig==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778242576; cv=none;\n b=MNxuvRJlibjMNvm7taoyjkU+G53970j5L1jYRARG54nIuweft8mdHXwWv0ij/L385I6QOxrZtc7giFwzmtZnNfJe3VhIk0ETKtXZ6nwm9fD6p6tqFspQ9IhhpuvP1ydl4fgk9V5KnbuCY7We2J2Hh73fgCR7OrPzVj88A4mCmgc="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1778242902; c=relaxed/relaxed;\n\tbh=mOG2NnAGPPdQ3W0BX30E8ncse768vHXAuwsNTrJ5Vfw=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=gfXx0kv5WiTVOgrlgQcIyX38/HexSL2Q91Q9GwrscXWf4HQWhhvmRqOx80aGU16V8RosakRSGvcnMljnHCUZXfg8Yu+bEPP394WfyICqx1onPh9oVty9RC9+KM+dHgoiz+1JY6EYMqZcMzbSXZR69CoLxVV2R3xSQAIs7LzV4mEZty1GQMryZQBqdWtM7al2oTbnMK3rlVXFDZroa8XQCVAAm1EGv4r5WM5jPtg9UwnqgMxc6IUzxnBSHYVW3ij3xIldR9z+qqKSQJ5wueTwlJSjccoENALDzMfTf2+dMZXBAiX41uByVO3BEtvUtEcvl3scizc/D90pdSUT3dMhMw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778242576; c=relaxed/simple;\n\tbh=OCr7/orzjZm0TJC3ZdQdc8ZIR6kVqo8sCAQ2Ng4CQEo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=k2G2P1PJaKoVGIwH+IOx4XJvhWF28zSHpSJRKbtMlHkB6GL0JpmPqohfH6pp30UOSnL+z5q0VlEXK9mcKDLigFMn8ZHHy+IqulAncZuqDTqe+zswBTfSxBZvOyTiOtoVw8sKJQ/kDwT8PoS8pF3d+D7rgwHK4HPjvEwofnyxb/w="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.alibaba.com;\n dkim=pass (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=oBslsgyw; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16370-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=linux.alibaba.com;\n spf=pass smtp.mailfrom=linux.alibaba.com;\n dkim=pass (1024-bit key) header.d=linux.alibaba.com\n header.i=@linux.alibaba.com header.b=oBslsgyw;\n arc=none smtp.client-ip=115.124.30.111"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linux.alibaba.com; s=default;\n\tt=1778242566; h=From:To:Subject:Date:Message-ID:MIME-Version;\n\tbh=mOG2NnAGPPdQ3W0BX30E8ncse768vHXAuwsNTrJ5Vfw=;\n\tb=oBslsgyw53QhYZYqDQ8OoZ3q+LS7yS/f7Rs1zDCitQk66DlKQk5flgwsXL2/gkGqSWKw6ZvDTNVnWzvut3jjw1qGN+0Jw0gPdFfPTyd1tShpDW8vMadK4P3VYJFBWa5h5phDthLN54gG6eULOb96EVDPyOPBPpwAJp6j6Qtwzn0=",
        "X-Alimail-AntiSpam": "\n AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=libaokun@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0X2XQgpZ_1778242564;",
        "From": "Baokun Li <libaokun@linux.alibaba.com>",
        "To": "linux-ext4@vger.kernel.org",
        "Cc": "linux-crypto@vger.kernel.org,\n\tebiggers@kernel.org,\n\tardb@kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tjack@suse.cz,\n\tyi.zhang@huawei.com,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tBaokun Li <libaokun@linux.alibaba.com>",
        "Subject": "[PATCH RFC 07/17] ext4: use fast incremental CRC update in\n ext4_mb_mark_context()",
        "Date": "Fri,  8 May 2026 20:15:29 +0800",
        "Message-ID": "<20260508121539.4174601-8-libaokun@linux.alibaba.com>",
        "X-Mailer": "git-send-email 2.43.7",
        "In-Reply-To": "<20260508121539.4174601-1-libaokun@linux.alibaba.com>",
        "References": "<20260508121539.4174601-1-libaokun@linux.alibaba.com>",
        "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=-8.7 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,UNPARSEABLE_RELAY,USER_IN_DEF_DKIM_WL autolearn=disabled\n\tversion=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "Use ext4_block_bitmap_csum_set_range() in ext4_mb_mark_context() for\nfast incremental block bitmap checksum updates. Instead of re-scanning\nthe entire bitmap after every allocation or free, the incremental update\ncomputes the CRC delta for the modified bit range in O(log N) time.\n\nAdd a fast_crc flag that is set when EXT4_MB_BITMAP_MARKED_CHECK is not\nused. When fast_crc is true, all bits in the range are guaranteed to flip,\nso the incremental CRC via ext4_block_bitmap_csum_set_range() is correct.\nOtherwise, fall back to ext4_block_bitmap_csum_set() for a full CRC\nrecalculation, since idempotent operations (mb_set_bits/mb_clear_bits\nwith EXT4_MB_BITMAP_MARKED_CHECK) may leave some bits unchanged.\n\nFor the BLOCK_UNINIT case, the bitmap was just initialized and there is\nno valid old checksum, so fast_crc is forced to false to ensure a full\nCRC recalculation establishes a correct baseline.\n\nSigned-off-by: Baokun Li <libaokun@linux.alibaba.com>\n---\n fs/ext4/mballoc.c | 22 +++++++++++++++++++++-\n 1 file changed, 21 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c\nindex ff2023c9f52c..77f6309916d1 100644\n--- a/fs/ext4/mballoc.c\n+++ b/fs/ext4/mballoc.c\n@@ -4095,6 +4095,7 @@ ext4_mb_mark_context(handle_t *handle, struct super_block *sb, bool state,\n \tstruct buffer_head *gdp_bh;\n \tint err;\n \tunsigned int i, already, changed = len;\n+\tbool fast_crc;\n \n \tKUNIT_STATIC_STUB_REDIRECT(ext4_mb_mark_context,\n \t\t\t\t   handle, sb, state, group, blkoff, len,\n@@ -4127,12 +4128,28 @@ ext4_mb_mark_context(handle_t *handle, struct super_block *sb, bool state,\n \t\t\tgoto out_err;\n \t}\n \n+\t/*\n+\t * fast_crc: Use incremental CRC update via crc32c_flip_range().\n+\t * This is only valid when all bits in [blkoff, blkoff+len) are\n+\t * guaranteed to be in the opposite state (i.e., every bit will\n+\t * actually flip). When EXT4_MB_BITMAP_MARKED_CHECK is set,\n+\t * mb_set_bits/mb_clear_bits are idempotent, so some bits may not\n+\t * change and incremental CRC would produce incorrect results.\n+\t */\n+\tfast_crc = !(flags & EXT4_MB_BITMAP_MARKED_CHECK);\n+\n \text4_lock_group(sb, group);\n \tif (ext4_has_group_desc_csum(sb) &&\n \t    (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT))) {\n \t\tgdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);\n \t\text4_free_group_clusters_set(sb, gdp,\n \t\t\text4_free_clusters_after_init(sb, group, gdp));\n+\t\t/*\n+\t\t * The bitmap was just initialized, so the old checksum\n+\t\t * is invalid for incremental CRC update. Fall back to\n+\t\t * full recalculation.\n+\t\t */\n+\t\tfast_crc = false;\n \t}\n \n \tif (flags & EXT4_MB_BITMAP_MARKED_CHECK) {\n@@ -4154,7 +4171,10 @@ ext4_mb_mark_context(handle_t *handle, struct super_block *sb, bool state,\n \t\t\text4_free_group_clusters(sb, gdp) + changed);\n \t}\n \n-\text4_block_bitmap_csum_set(sb, gdp, bitmap_bh);\n+\tif (fast_crc)\n+\t\text4_block_bitmap_csum_set_range(sb, gdp, blkoff, len);\n+\telse\n+\t\text4_block_bitmap_csum_set(sb, gdp, bitmap_bh);\n \text4_group_desc_csum_set(sb, group, gdp);\n \text4_unlock_group(sb, group);\n \tif (ret_changed)\n",
    "prefixes": [
        "RFC",
        "07/17"
    ]
}