get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225130,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225130/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260420114714.1621982-9-aalbersh@kernel.org/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260420114714.1621982-9-aalbersh@kernel.org>",
    "date": "2026-04-20T11:46:55",
    "name": "[v8,08/22] iomap: teach iomap to read files with fsverity",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "09e7cf91ea2f6e70067fda13ce4183c3d4535326",
    "submitter": {
        "id": 92821,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/92821/?format=api",
        "name": "Andrey Albershteyn",
        "email": "aalbersh@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260420114714.1621982-9-aalbersh@kernel.org/mbox/",
    "series": [
        {
            "id": 500600,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500600/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=500600",
            "date": "2026-04-20T11:46:51",
            "name": "fs-verity support for XFS with post EOF merkle tree",
            "version": 8,
            "mbox": "http://patchwork.ozlabs.org/series/500600/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225130/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225130/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <SRS0=NsEl=CT=vger.kernel.org=linux-ext4+bounces-15921-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=Kx1zArzN;\n\tdkim-atps=neutral",
            "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=nsel=ct=vger.kernel.org=linux-ext4+bounces-15921-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=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=Kx1zArzN;\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-15921-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=\"Kx1zArzN\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzkPm3mcBz1yD4\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 21:52:44 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fzkPm3J8Zz4wCm\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 21:52:44 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fzkPm3FDJz4wCx; Mon, 20 Apr 2026 21:52:44 +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 4fzkPj02mMz4wCm\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 20 Apr 2026 21:52:40 +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 F3062312540E\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 20 Apr 2026 11:48:01 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 884A039E192;\n\tMon, 20 Apr 2026 11:48:01 +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 484F939DBF0;\n\tMon, 20 Apr 2026 11:47:59 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 8D0ABC2BCB6;\n\tMon, 20 Apr 2026 11:47:56 +0000 (UTC)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776685964; cv=pass;\n\tb=uGKAlIuQUup3KaGzluNmDcZutNs6EvZNWHVjVOnRZtUX3cckguaENvGcdSHSqqIt3GzSk4NC4QG1MWtr8+eESYsSp4vt6jCKixhw6Y9whS8zAz6Awe6XLLvrX/GatZk7eqwt65S0ZggrE16kLjlWGq269gRCt2UiCnLJhyO0dxDni8y/YFOUcTLxuDEKSRkOsoV9VORswHTZvCV0p62CqehgjGjfWrYzj2K2pR7KsgUoEEDzVEHzB1EwM0WUwAGg5JBf/alBdP3WR6GW9PAZ7XxUEcoiAYZ1tW5jhTO5po8R76kCCfq9DhaD0huJpcOoypraSZiQcAGmbaWq7tb5tA==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776685681; cv=none;\n b=dcNoVXEDM3MADl7oP1qfJz+/IbCjcP05TAuSUn5O20vFRuQqSFIE06We7SK89gV+vZXTTj+ue+J5nZmNvIGRjvtW9IPlw0/j4NaTMiefDhLhQQOzsgQDNEgn7mWVP8wzBp81kYTFj7R65VkU2ZeSp3VKPUWGI7ovIve3Bwvwc7g="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776685964; c=relaxed/relaxed;\n\tbh=yoyh3UlA9TZ7k4TARLbtf9/vHDIlY0ClXxGrXy/3jMQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=DUgA/cmF2UQYESuuqKE/t8WqqcDizpcrSFtYu6NzRpA6QZjkA8C2co6zNmoexjqGdnNNggqlWwvgDjVVRfTL71PD2218S4Ke+3unBxKamgIQ8acin3v7erxgyxlZkwWlgvJVodKTwvJtuNmeSM4zxGZWIY2GAnWYx09IUSZR5Fen6nc2C+uc/pNRgX5SkjSgFxJyE7FOLh+kYCoJ+wEbcs0zyW+nO9flbTCFtMiC2Oky2loUqciJXwdHYEWkA1xAMYJ5RzqBGkDBFZ8p+nV5rAnZkiMG1tzTDUYYMTNkSwzIrsvuMLYEm30PZBry7Fl3Mq0cxc+6JR/8w8CAITm3Ag==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776685681; c=relaxed/simple;\n\tbh=828QqygZ+rCpf7T6T6f7PIgnPBQ8F12tnt1TM4pNE9M=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=XPSSaTLDb8yOInQrcslH2wSg6Yu3Rjpd5kT8Hb1zBH6iKxVWg5CPOR1NuJSq4qu+AhjvmfrE01frb3sUK6NnL9gxK5xccuoPLevP+zW8e4pYq110aMg7NoFkbk8/I03xmjrHVoUveLAgBhBZ6YXo3OEa62vERWcsd5OAu1YTWi4="
        ],
        "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=Kx1zArzN; 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-15921-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=Kx1zArzN; 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=1776685679;\n\tbh=828QqygZ+rCpf7T6T6f7PIgnPBQ8F12tnt1TM4pNE9M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Kx1zArzNtu8cYuU9MH0tTSnlDigYMYO3ULtOdvLjutqy5nJ/5EE/BP21dMWoORPzr\n\t Xy/7kObBvz3PPGcSpXvkfuX+qU9eNPmASp7LjjmCbIum7TrPV8o8N04IWITEnzGfbi\n\t xyP36MQc2LYhvEM67NF569Uo+ZUZUIGxzvCQvr7SfXwdKq0Kj1uSPeedJrmdYX1PDD\n\t T+nll93pwxjhHdjLAyLLPIkpmhtFYHA2Vnf/GZAz/N+CRxJvV2uk/88sdgtQWPpj/N\n\t yWp/K2EoYzghkWHx0rohwZfhQbLcIBjRGlteDFte6GI8VZ3nnL6x6dxABDjGsbf4i/\n\t 5ea+R0XZK36AQ==",
        "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\tlinux-unionfs@vger.kernel.org,\n\tdjwong@kernel.org",
        "Subject": "[PATCH v8 08/22] iomap: teach iomap to read files with fsverity",
        "Date": "Mon, 20 Apr 2026 13:46:55 +0200",
        "Message-ID": "<20260420114714.1621982-9-aalbersh@kernel.org>",
        "X-Mailer": "git-send-email 2.51.2",
        "In-Reply-To": "<20260420114714.1621982-1-aalbersh@kernel.org>",
        "References": "<20260420114714.1621982-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": "Obtain fsverity info for folios with file data and fsverity metadata.\nFilesystem can pass vi down to ioend and then to fsverity for\nverification. This is different from other filesystems ext4, f2fs, btrfs\nsupporting fsverity, these filesystems don't need fsverity_info for\nreading fsverity metadata. While reading merkle tree iomap requires\nfsverity info to synthesize hashes for zeroed data block.\n\nfsverity metadata has two kinds of holes - ones in merkle tree and one\nafter fsverity descriptor.\n\nMerkle tree holes are blocks full of hashes of zeroed data blocks. These\nare not stored on the disk but synthesized on the fly. This saves a bit\nof space for sparse files. Due to this iomap also need to lookup\nfsverity_info for folios with fsverity metadata. ->vi has a hash of the\nzeroed data block which will be used to fill the merkle tree block.\n\nThe hole past descriptor is interpreted as end of metadata region. As we\ndon't have EOF here we use this hole as an indication that rest of the\nfolio is empty. This patch marks rest of the folio beyond fsverity\ndescriptor as uptodate.\n\nFor file data, fsverity needs to verify consistency of the whole file\nagainst the root hash, hashes of holes are included in the merkle tree.\nVerify them too.\n\nIssue reading of fsverity merkle tree on the fsverity inodes. This way\nmetadata will be available at I/O completion time.\n\nReviewed-by: Darrick J. Wong <djwong@kernel.org>\nReviewed-by: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Andrey Albershteyn <aalbersh@kernel.org>\n---\n fs/iomap/buffered-io.c | 41 +++++++++++++++++++++++++++++++++++++++--\n include/linux/iomap.h  |  2 ++\n 2 files changed, 41 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c\nindex 38c9592fba43..843314852663 100644\n--- a/fs/iomap/buffered-io.c\n+++ b/fs/iomap/buffered-io.c\n@@ -9,6 +9,7 @@\n #include <linux/swap.h>\n #include <linux/migrate.h>\n #include <linux/fserror.h>\n+#include <linux/fsverity.h>\n #include \"internal.h\"\n #include \"trace.h\"\n \n@@ -561,9 +562,27 @@ static int iomap_read_folio_iter(struct iomap_iter *iter,\n \t\tif (plen == 0)\n \t\t\treturn 0;\n \n-\t\t/* zero post-eof blocks as the page may be mapped */\n-\t\tif (iomap_block_needs_zeroing(iter, pos)) {\n+\t\t/*\n+\t\t * Handling of fsverity \"holes\". We hit this for two case:\n+\t\t *   1. No need to go further, the hole after fsverity\n+\t\t *\tdescriptor is the end of the fsverity metadata.\n+\t\t *\n+\t\t *   2. This folio contains merkle tree blocks which need to be\n+\t\t *\tsynthesized. If we already have fsverity info (ctx->vi)\n+\t\t *\tsynthesize these blocks.\n+\t\t */\n+\t\tif ((iomap->flags & IOMAP_F_FSVERITY) &&\n+\t\t    iomap->type == IOMAP_HOLE) {\n+\t\t\tif (ctx->vi)\n+\t\t\t\tfsverity_fill_zerohash(folio, poff, plen,\n+\t\t\t\t\t\t       ctx->vi);\n+\t\t\tiomap_set_range_uptodate(folio, poff, plen);\n+\t\t} else if (iomap_block_needs_zeroing(iter, pos)) {\n+\t\t\t/* zero post-eof blocks as the page may be mapped */\n \t\t\tfolio_zero_range(folio, poff, plen);\n+\t\t\tif (ctx->vi &&\n+\t\t\t    !fsverity_verify_blocks(ctx->vi, folio, plen, poff))\n+\t\t\t\treturn -EIO;\n \t\t\tiomap_set_range_uptodate(folio, poff, plen);\n \t\t} else {\n \t\t\tif (!*bytes_submitted)\n@@ -614,6 +633,15 @@ void iomap_read_folio(const struct iomap_ops *ops,\n \n \ttrace_iomap_readpage(iter.inode, 1);\n \n+\t/*\n+\t * Fetch fsverity_info for both data and fsverity metadata, as iomap\n+\t * needs zeroed hash for merkle tree block synthesis\n+\t */\n+\tctx->vi = fsverity_get_info(iter.inode);\n+\tif (ctx->vi && iter.pos < i_size_read(iter.inode))\n+\t\tfsverity_readahead(ctx->vi, folio->index,\n+\t\t\t\t   folio_nr_pages(folio));\n+\n \twhile ((ret = iomap_iter(&iter, ops)) > 0)\n \t\titer.status = iomap_read_folio_iter(&iter, ctx,\n \t\t\t\t&bytes_submitted);\n@@ -681,6 +709,15 @@ void iomap_readahead(const struct iomap_ops *ops,\n \n \ttrace_iomap_readahead(rac->mapping->host, readahead_count(rac));\n \n+\t/*\n+\t * Fetch fsverity_info for both data and fsverity metadata, as iomap\n+\t * needs zeroed hash for merkle tree block synthesis\n+\t */\n+\tctx->vi = fsverity_get_info(iter.inode);\n+\tif (ctx->vi && iter.pos < i_size_read(iter.inode))\n+\t\tfsverity_readahead(ctx->vi, readahead_index(rac),\n+\t\t\t\treadahead_count(rac));\n+\n \twhile (iomap_iter(&iter, ops) > 0)\n \t\titer.status = iomap_readahead_iter(&iter, ctx,\n \t\t\t\t\t&cur_bytes_submitted);\ndiff --git a/include/linux/iomap.h b/include/linux/iomap.h\nindex 4506a99d5285..4d9202cae29f 100644\n--- a/include/linux/iomap.h\n+++ b/include/linux/iomap.h\n@@ -435,6 +435,7 @@ struct iomap_ioend {\n \tloff_t\t\t\tio_offset;\t/* offset in the file */\n \tsector_t\t\tio_sector;\t/* start sector of ioend */\n \tvoid\t\t\t*io_private;\t/* file system private data */\n+\tstruct fsverity_info\t*io_vi;\t\t/* fsverity info */\n \tstruct bio\t\tio_bio;\t\t/* MUST BE LAST! */\n };\n \n@@ -509,6 +510,7 @@ struct iomap_read_folio_ctx {\n \tstruct readahead_control *rac;\n \tvoid\t\t\t*read_ctx;\n \tloff_t\t\t\tread_ctx_file_offset;\n+\tstruct fsverity_info\t*vi;\n };\n \n struct iomap_read_ops {\n",
    "prefixes": [
        "v8",
        "08/22"
    ]
}