get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218290,
    "url": "http://patchwork.ozlabs.org/api/patches/2218290/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260331212827.2631020-5-aalbersh@kernel.org/",
    "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": "<20260331212827.2631020-5-aalbersh@kernel.org>",
    "list_archive_url": null,
    "date": "2026-03-31T21:28:05",
    "name": "[v6,04/22] fsverity: pass digest size and hash of the empty block to ->write",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "277c9e9dab482b0edcbbaba0b5bf2bde165db7f4",
    "submitter": {
        "id": 92821,
        "url": "http://patchwork.ozlabs.org/api/people/92821/?format=api",
        "name": "Andrey Albershteyn",
        "email": "aalbersh@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260331212827.2631020-5-aalbersh@kernel.org/mbox/",
    "series": [
        {
            "id": 498255,
            "url": "http://patchwork.ozlabs.org/api/series/498255/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=498255",
            "date": "2026-03-31T21:28:01",
            "name": "fs-verity support for XFS with post EOF merkle tree",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/498255/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218290/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218290/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=rc7o=B7=vger.kernel.org=linux-ext4+bounces-15551-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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=noL2GwiU;\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=rc7o=b7=vger.kernel.org=linux-ext4+bounces-15551-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=quarantine dis=none) header.from=kernel.org",
            "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=noL2GwiU;\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-15551-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"noL2GwiU\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "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 4flhLF4Xcrz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 08:37:57 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4flhLF419yz58dL\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 08:37:57 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4flhLF3xfvz4wGx; Wed, 01 Apr 2026 08:37:57 +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 4flhL732Mdz58df\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 01 Apr 2026 08:37:51 +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 4F7AA31228A5\n\tfor <patchwork-incoming@ozlabs.org>; Tue, 31 Mar 2026 21:29:15 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A51A34657E2;\n\tTue, 31 Mar 2026 21:28:47 +0000 (UTC)",
            "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 636484534B0;\n\tTue, 31 Mar 2026 21:28:47 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 9A51BC19423;\n\tTue, 31 Mar 2026 21:28:44 +0000 (UTC)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774993077; cv=pass;\n\tb=mjSVMh3/S8ZjXYZBifwN7lD+07mR96bfn2b16fmCTv6CPoMNGfbABa/JF9Lm6q0oS6JvXY68ylX/utcogZjzs78Vb8nqS39wNpRShDQl1jkD5evvSVDFhF+Mt7/2KbYyQsEKT5oAfUs8qJxelDv1nOvpGA5ofyezSQGPTpYMMn+G+uQTPfgPPqYkZE/yMufPQ41oze5FcUlND+8ovDf3T4RBpxmlo3zBpdqt+zBJL44eDU6JE3USp1L79dDPUtyCURQaWgBcExxFlCfoNyPxFasEFsS13W43e0/vjK0b4Y5do08H+YpmJNP4g0QwXRySNz462rqbb+Ir9jfX4zrxzA==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774992527; cv=none;\n b=cLxOINGqx1i/BVr9seM/zhN0ZWPFxkI/fpLkU/JT/j709g4JDR0N/6Ni55EONeVKSQLOGLY0MnRc5mPECJ297Rb93bwjoM6GJ2Y0+jtkD1VwkkUfcvE06UEEg37uuHZXmt2/RJMv8ovzPB4H/Nm/nEBMcwr9WdlempseYcw0gYk="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774993077; c=relaxed/relaxed;\n\tbh=BCi8pnG1srgxMmhdFXmSmr5BllP7SyDqIyXH4uxbDV0=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=WE4U9XsuRH4riI0GqLtL2FwxDgLiHPQjXgdl/u2t3oRVJ3dUHXo8FuZdKuCFI/dnxvQGW3O1DBmYCZIgZbSW8YPKdLTCVhq310EB3uz7BeDpvidnQjFjIFrsanOnDbMtsubgIOd70yxY/RabFBVI4piIPL4rE+OEVqHgA+kxGn4ORXf4VF3Faw0PnT4RdoRGas47OYzVF8lCgvQm/5rniglM3fYjIq5GakU3rwo2c/KGIxcl+tJ/YcKR7MM8Sc/ueya+4vP/gY7axp5DwbGv31173ZeyeQloFiyIK+RXHAhfWn+J7biHu/YAjM5w1HfhDtEKhz8YL/SjjUNju5d8Zg==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774992527; c=relaxed/simple;\n\tbh=WJ1MvN8V+hC/HPZfDG3Jxx2eF+NqyWJKvekF+n3PMXc=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=XTbzNMYKyc/xMWTZ/rfxlC1T7B/rDFJBcqqQq+yuI4Cw3M3kgoGr+SXm7RQ2cfz6O8ljcHh7RBSMmoOgBtJT1q9y8sdVcHVtsmXHcPfTPYV/9GYyBwfWfbYOQw/ZwXmwHASkTCdBL5EkT8IsiT8f7qsbi2h0Yx575QBglok++TM="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=noL2GwiU; 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-15551-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=noL2GwiU; arc=none smtp.client-ip=10.30.226.201"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1774992527;\n\tbh=WJ1MvN8V+hC/HPZfDG3Jxx2eF+NqyWJKvekF+n3PMXc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=noL2GwiUMmJXMFUKQbYRlFByI6TziVZXDiNtIbtGUXzQXIgWdD3oxEKF4EgcZDzKk\n\t ec4xchchqX2Y3+AiukKKCdijWdRfJII/XIwM/4wC5nWBVlr6YqyNryBMoYUHYMPWUc\n\t cC3+d6QVY1WsWbCT9KhvMTZWQiJ3TDEOmYCfg1nRi3qSJ+fBYPh4Cqs2avpTj1nlAA\n\t mSbdSFnZ5mOd2/aD36zr2laNrb4JNG/9mnM3aqTK7rGy+CEjk5u2bQlMQrL6QbCP6A\n\t SnEdkVnYgC7V6Mb5sXDAge6eq13KyGltfxEutcVUswGEie/ndFWkV30w4q8K6jdZyt\n\t y0ev+ASs885+g==",
        "From": "Andrey Albershteyn <aalbersh@kernel.org>",
        "To": "linux-xfs@vger.kernel.org,\n\tfsverity@lists.linux.dev,\n\tlinux-fsdevel@vger.kernel.org,\n\tebiggers@kernel.org",
        "Cc": "Andrey Albershteyn <aalbersh@kernel.org>,\n\thch@lst.de,\n\tlinux-ext4@vger.kernel.org,\n\tlinux-f2fs-devel@lists.sourceforge.net,\n\tlinux-btrfs@vger.kernel.org,\n\tdjwong@kernel.org",
        "Subject": "[PATCH v6 04/22] fsverity: pass digest size and hash of the empty\n block to ->write",
        "Date": "Tue, 31 Mar 2026 23:28:05 +0200",
        "Message-ID": "<20260331212827.2631020-5-aalbersh@kernel.org>",
        "X-Mailer": "git-send-email 2.51.2",
        "In-Reply-To": "<20260331212827.2631020-1-aalbersh@kernel.org>",
        "References": "<20260331212827.2631020-1-aalbersh@kernel.org>",
        "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\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "Let filesystem iterate over hashes in the block and check if these are\nhashes of zeroed data blocks. XFS will use this to decide if it want to\nstore tree block full of these hashes.\n\nSigned-off-by: Andrey Albershteyn <aalbersh@kernel.org>\nReviewed-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n fs/btrfs/verity.c        | 6 +++++-\n fs/ext4/verity.c         | 4 +++-\n fs/f2fs/verity.c         | 4 +++-\n fs/verity/enable.c       | 4 +++-\n include/linux/fsverity.h | 6 +++++-\n 5 files changed, 19 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/fs/btrfs/verity.c b/fs/btrfs/verity.c\nindex 0062b3a55781..6d8d3808d75d 100644\n--- a/fs/btrfs/verity.c\n+++ b/fs/btrfs/verity.c\n@@ -773,11 +773,15 @@ static struct page *btrfs_read_merkle_tree_page(struct inode *inode,\n  * @buf:\tMerkle tree block to write\n  * @pos:\tthe position of the block in the Merkle tree (in bytes)\n  * @size:\tthe Merkle tree block size (in bytes)\n+ * @zero_digest:\tthe hash of a merkle block-sized buffer of zeroes\n+ * @digest_size:\tsize of zero_digest, in bytes\n  *\n  * Returns 0 on success or negative error code on failure\n  */\n static int btrfs_write_merkle_tree_block(struct file *file, const void *buf,\n-\t\t\t\t\t u64 pos, unsigned int size)\n+\t\t\t\t\t u64 pos, unsigned int size,\n+\t\t\t\t\t const u8 *zero_digest,\n+\t\t\t\t\t unsigned int digest_size)\n {\n \tstruct inode *inode = file_inode(file);\n \tloff_t merkle_pos = merkle_file_pos(inode);\ndiff --git a/fs/ext4/verity.c b/fs/ext4/verity.c\nindex ca61da53f313..347945ac23a4 100644\n--- a/fs/ext4/verity.c\n+++ b/fs/ext4/verity.c\n@@ -374,7 +374,9 @@ static void ext4_readahead_merkle_tree(struct inode *inode, pgoff_t index,\n }\n \n static int ext4_write_merkle_tree_block(struct file *file, const void *buf,\n-\t\t\t\t\tu64 pos, unsigned int size)\n+\t\t\t\t\tu64 pos, unsigned int size,\n+\t\t\t\t\tconst u8 *zero_digest,\n+\t\t\t\t\tunsigned int digest_size)\n {\n \tpos += ext4_verity_metadata_pos(file_inode(file));\n \ndiff --git a/fs/f2fs/verity.c b/fs/f2fs/verity.c\nindex 92ebcc19cab0..b3b3e71604ac 100644\n--- a/fs/f2fs/verity.c\n+++ b/fs/f2fs/verity.c\n@@ -270,7 +270,9 @@ static void f2fs_readahead_merkle_tree(struct inode *inode, pgoff_t index,\n }\n \n static int f2fs_write_merkle_tree_block(struct file *file, const void *buf,\n-\t\t\t\t\tu64 pos, unsigned int size)\n+\t\t\t\t\tu64 pos, unsigned int size,\n+\t\t\t\t\tconst u8 *zero_digest,\n+\t\t\t\t\tunsigned int digest_size)\n {\n \tpos += f2fs_verity_metadata_pos(file_inode(file));\n \ndiff --git a/fs/verity/enable.c b/fs/verity/enable.c\nindex 42dfed1ce0ce..ad4ff71d7dd9 100644\n--- a/fs/verity/enable.c\n+++ b/fs/verity/enable.c\n@@ -50,7 +50,9 @@ static int write_merkle_tree_block(struct file *file, const u8 *buf,\n \tint err;\n \n \terr = inode->i_sb->s_vop->write_merkle_tree_block(file, buf, pos,\n-\t\t\t\t\t\t\t  params->block_size);\n+\t\t\t\t\t\t\t  params->block_size,\n+\t\t\t\t\t\t\t  params->zero_digest,\n+\t\t\t\t\t\t\t  params->digest_size);\n \tif (err)\n \t\tfsverity_err(inode, \"Error %d writing Merkle tree block %lu\",\n \t\t\t     err, index);\ndiff --git a/include/linux/fsverity.h b/include/linux/fsverity.h\nindex 03f703e5bb40..881db75f1cba 100644\n--- a/include/linux/fsverity.h\n+++ b/include/linux/fsverity.h\n@@ -124,6 +124,8 @@ struct fsverity_operations {\n \t * @buf: the Merkle tree block to write\n \t * @pos: the position of the block in the Merkle tree (in bytes)\n \t * @size: the Merkle tree block size (in bytes)\n+\t * @zero_digest: the hash of a merkle block-sized buffer of zeroes\n+\t * @digest_size: size of zero_digest, in bytes\n \t *\n \t * This is only called between ->begin_enable_verity() and\n \t * ->end_enable_verity().\n@@ -131,7 +133,9 @@ struct fsverity_operations {\n \t * Return: 0 on success, -errno on failure\n \t */\n \tint (*write_merkle_tree_block)(struct file *file, const void *buf,\n-\t\t\t\t       u64 pos, unsigned int size);\n+\t\t\t\t       u64 pos, unsigned int size,\n+\t\t\t\t       const u8 *zero_digest,\n+\t\t\t\t       unsigned int digest_size);\n };\n \n #ifdef CONFIG_FS_VERITY\n",
    "prefixes": [
        "v6",
        "04/22"
    ]
}