Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2230309/?format=api
{ "id": 2230309, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230309/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177747214804.4107473.6585738532314990412.stgit@frogsfrogsfrogs/", "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": "<177747214804.4107473.6585738532314990412.stgit@frogsfrogsfrogs>", "date": "2026-04-29T14:56:32", "name": "[15/19] fuse4fs: separate invalidation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "753b4868135d35a527e0d3b0b8c6da4e4d5e9f13", "submitter": { "id": 77032, "url": "http://patchwork.ozlabs.org/api/1.1/people/77032/?format=api", "name": "Darrick J. Wong", "email": "djwong@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177747214804.4107473.6585738532314990412.stgit@frogsfrogsfrogs/mbox/", "series": [ { "id": 502087, "url": "http://patchwork.ozlabs.org/api/1.1/series/502087/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=502087", "date": "2026-04-29T14:53:09", "name": "[01/19] fuse2fs: implement bare minimum iomap for file mapping reporting", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502087/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230309/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230309/checks/", "tags": {}, "headers": { "Return-Path": "\n <SRS0=CKNM=C4=vger.kernel.org=linux-ext4+bounces-16204-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=WshfxKNk;\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=cknm=c4=vger.kernel.org=linux-ext4+bounces-16204-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=WshfxKNk;\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-16204-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=\"WshfxKNk\"", "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 4g5L4H3r0qz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 00:57:03 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g5L4H3MFkz4wM1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 00:57:03 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4g5L4H3HG5z4wLR; Thu, 30 Apr 2026 00:57:03 +1000 (AEST)", "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 4g5L4C726vz4wM1\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 30 Apr 2026 00:56:59 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 481A0301178F\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 29 Apr 2026 14:56:36 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4644730DEB2;\n\tWed, 29 Apr 2026 14:56:33 +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 08EBA27EFE9;\n\tWed, 29 Apr 2026 14:56:33 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id CB2DFC19425;\n\tWed, 29 Apr 2026 14:56:32 +0000 (UTC)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1777474623; cv=pass;\n\tb=yXiA3A3WWuuF0cYNjuQdG1LqPm0VWXMnI6H7HfZlGSzJ3X84pDIHwj35rZ+L3DupizrmJh5I5l08oPbqKTdl0vbcgTvLQW5F9mi78u8o0HxGMGctEQJwK7t5FF+iF/Jc3vSVF1uUOXSTw+psvZVbwZcKN4ptA+dxkfmbzb3SBowQVQT+pbud6Zin6InAWegx5EnCmYpvnCJvDqzTFYv5g4gV+lOpOsiDckh8aP1Xkju+hrq+7TXLasboIhUU5Rolom16yxBX2oNYVusklhmqUZLLHzphXilfZjcTpBBJS0yUvEKLkNBbX4Ld90pbsh8gHkJLHRQnsORd4vsheD19hg==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777474593; cv=none;\n b=hbpT7Jt73e0DLj7Ej5j/sedwQ1neLG5QAlvGDwmd7nl3F5/QtAK6lrl+Jq3/azsrIVXIPBxFpzHyW/gHxzOTX3cL3D2ZjXBvM6GoWYgCJsfHx9x2v73p1ySZ4eOF/18SpreN5rhJZG/qU6c7+8q3qtal8UPVoRG0F0a7LH0whNw=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1777474623; c=relaxed/relaxed;\n\tbh=L1yFUC9P28p2uk+V9PTgNjrOO9C57tTK9iD6ZZjf68U=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=HYtFAy4yHcXwK83qJIplo/x4R5IrhzhlCA7AytnO+Av6MMY4xb9qArA3vFAkpilUf2RUEVaxfE4+msvm+uU9V82fF7th/WNRoppLxf98pPPuXNkRal3ORnNLbPSUunZvnpRLZCIGUzew8YsT4d+iJqhvLlv6tWB+3LmBCqqoTi3P0G0/tXi1CtU3Z0Wz32lngpLNXYjqWctKSCNg9fMKcdXduZZVZKInkvz4DPsRb8xOGjS+VnhLuLsQMbhgsr/PxEK8G6cyjd8ilqN86DNlgtNrHWCHeMwUCE+jRKbHG7CY31ZxLuo4qBjxwfxuioVIwxkAvQsXmxjznJL8F8tpHQ==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777474593; c=relaxed/simple;\n\tbh=GnRiRuVR7Zp8LfRFffmx59sd85sWQ5DzJxEwg3FAetE=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=jG+TWRlZw7OEqMhqXG0VJt90qHvmKVSzACaaM7WmOX/gaxIr7FxJ95zHSAhYQzJD75r16si2T7oC4yuzauQn94r3db5x7Zg7aoWeufNHZhlvfc3pJR8Aa7tSUjvqTbb00s6GUJjjzLAZ3/3ZXz+RHEZ5IpOgrnbAr4HLqdLgYHU=" ], "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=WshfxKNk; 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-16204-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=WshfxKNk; 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=1777474592;\n\tbh=GnRiRuVR7Zp8LfRFffmx59sd85sWQ5DzJxEwg3FAetE=;\n\th=Date:Subject:From:To:Cc:In-Reply-To:References:From;\n\tb=WshfxKNkWu9Tey+8prwOyC35QnKYya7oAHn6ZWw+CW7Lz74Zz7kWAlBsls2skJFJj\n\t 4msStcUm/7Ig+Yk5u0VY3A1/DhgOGL7oNRhL22mXIM8UG+0vvLuw5n6ycJx/vw/vJU\n\t GSiOnWDVBrRqK+EIxWhBqJdsSlCaX1EwCPwXJOawV6VMNFPsQAI4U2dlxoej2HOP7p\n\t 9CHjQZpaHDF0AZoKSgJ7NaqNxJ0SKr65kZjGyV/PNJSoNR3qE+vMDB108PqHsDVNjD\n\t SD+zjWehc373+CYkLgTyHLs9YPo0vf+dVFrIERGoLNIWoP5C/DsZO6p7vZ1yOQl4Ln\n\t F4zDibtF6SLig==", "Date": "Wed, 29 Apr 2026 07:56:32 -0700", "Subject": "[PATCH 15/19] fuse4fs: separate invalidation", "From": "\"Darrick J. Wong\" <djwong@kernel.org>", "To": "tytso@mit.edu", "Cc": "bernd@bsbernd.com, miklos@szeredi.hu, linux-ext4@vger.kernel.org,\n neal@gompa.dev, linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev,\n joannelkoong@gmail.com", "Message-ID": "<177747214804.4107473.6585738532314990412.stgit@frogsfrogsfrogs>", "In-Reply-To": "<177747214459.4107473.9520724883867588970.stgit@frogsfrogsfrogs>", "References": "<177747214459.4107473.9520724883867588970.stgit@frogsfrogsfrogs>", "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-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "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": "From: Darrick J. Wong <djwong@kernel.org>\n\nUse the new stuff\n\nSigned-off-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n fuse4fs/fuse4fs.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++\n misc/fuse2fs.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 121 insertions(+)", "diff": "diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c\nindex e92a85da0115ca..6016e23c511ac1 100644\n--- a/fuse4fs/fuse4fs.c\n+++ b/fuse4fs/fuse4fs.c\n@@ -293,6 +293,9 @@ struct fuse4fs {\n \tenum fuse4fs_iomap_state iomap_state;\n \tuint32_t iomap_dev;\n \tuint64_t iomap_cap;\n+\tvoid (*old_alloc_stats)(ext2_filsys fs, blk64_t blk, int inuse);\n+\tvoid (*old_alloc_stats_range)(ext2_filsys fs, blk64_t blk, blk_t num,\n+\t\t\t\t int inuse);\n #endif\n \tunsigned int blockmask;\n \tunsigned long offset;\n@@ -6958,6 +6961,51 @@ static int fuse4fs_iomap_config_devices(struct fuse4fs *ff)\n \treturn 0;\n }\n \n+static void fuse4fs_invalidate_bdev(struct fuse4fs *ff, blk64_t blk, blk_t num)\n+{\n+\toff_t offset = FUSE4FS_FSB_TO_B(ff, blk);\n+\toff_t length = FUSE4FS_FSB_TO_B(ff, num);\n+\tint ret;\n+\n+\tret = fuse_lowlevel_iomap_device_invalidate(ff->fuse, ff->iomap_dev,\n+\t\t\t\t\t\t offset, length);\n+\tif (!ret)\n+\t\treturn;\n+\n+\tif (num == 1)\n+\t\terr_printf(ff, \"%s %llu: %s\\n\",\n+\t\t\t _(\"error invalidating block\"),\n+\t\t\t (unsigned long long)blk,\n+\t\t\t strerror(ret));\n+\telse\n+\t\terr_printf(ff, \"%s %llu-%llu: %s\\n\",\n+\t\t\t _(\"error invalidating blocks\"),\n+\t\t\t (unsigned long long)blk,\n+\t\t\t (unsigned long long)blk + num - 1,\n+\t\t\t strerror(ret));\n+}\n+\n+static void fuse4fs_alloc_stats(ext2_filsys fs, blk64_t blk, int inuse)\n+{\n+\tstruct fuse4fs *ff = fs->priv_data;\n+\n+\tif (inuse < 0)\n+\t\tfuse4fs_invalidate_bdev(ff, blk, 1);\n+\tif (ff->old_alloc_stats)\n+\t\tff->old_alloc_stats(fs, blk, inuse);\n+}\n+\n+static void fuse4fs_alloc_stats_range(ext2_filsys fs, blk64_t blk, blk_t num,\n+\t\t\t\t int inuse)\n+{\n+\tstruct fuse4fs *ff = fs->priv_data;\n+\n+\tif (inuse < 0)\n+\t\tfuse4fs_invalidate_bdev(ff, blk, num);\n+\tif (ff->old_alloc_stats_range)\n+\t\tff->old_alloc_stats_range(fs, blk, num, inuse);\n+}\n+\n static void op_iomap_config(fuse_req_t req,\n \t\t\t const struct fuse_iomap_config_params *p,\n \t\t\t size_t psize)\n@@ -7004,6 +7052,19 @@ static void op_iomap_config(fuse_req_t req,\n \tif (ret)\n \t\tgoto out_unlock;\n \n+\t/*\n+\t * If we let iomap do all file block IO, then we need to watch for\n+\t * freed blocks so that we can invalidate any page cache that might\n+\t * get written to the block deivce.\n+\t */\n+\tif (fuse4fs_iomap_enabled(ff)) {\n+\t\text2fs_set_block_alloc_stats_callback(ff->fs,\n+\t\t\t\tfuse4fs_alloc_stats, &ff->old_alloc_stats);\n+\t\text2fs_set_block_alloc_stats_range_callback(ff->fs,\n+\t\t\t\tfuse4fs_alloc_stats_range,\n+\t\t\t\t&ff->old_alloc_stats_range);\n+\t}\n+\n out_unlock:\n \tfuse4fs_finish(ff, ret);\n \tif (ret)\ndiff --git a/misc/fuse2fs.c b/misc/fuse2fs.c\nindex c922c7fb45d311..138346fcc4517f 100644\n--- a/misc/fuse2fs.c\n+++ b/misc/fuse2fs.c\n@@ -276,6 +276,9 @@ struct fuse2fs {\n \tenum fuse2fs_iomap_state iomap_state;\n \tuint32_t iomap_dev;\n \tuint64_t iomap_cap;\n+\tvoid (*old_alloc_stats)(ext2_filsys fs, blk64_t blk, int inuse);\n+\tvoid (*old_alloc_stats_range)(ext2_filsys fs, blk64_t blk, blk_t num,\n+\t\t\t\t int inuse);\n #endif\n \tunsigned int blockmask;\n \tunsigned long offset;\n@@ -6278,6 +6281,50 @@ static int fuse2fs_iomap_config_devices(struct fuse2fs *ff)\n \treturn 0;\n }\n \n+static void fuse2fs_invalidate_bdev(struct fuse2fs *ff, blk64_t blk, blk_t num)\n+{\n+\toff_t offset = FUSE2FS_FSB_TO_B(ff, blk);\n+\toff_t length = FUSE2FS_FSB_TO_B(ff, num);\n+\tint ret;\n+\n+\tret = fuse_fs_iomap_device_invalidate(ff->iomap_dev, offset, length);\n+\tif (!ret)\n+\t\treturn;\n+\n+\tif (num == 1)\n+\t\terr_printf(ff, \"%s %llu: %s\\n\",\n+\t\t\t _(\"error invalidating block\"),\n+\t\t\t (unsigned long long)blk,\n+\t\t\t strerror(ret));\n+\telse\n+\t\terr_printf(ff, \"%s %llu-%llu: %s\\n\",\n+\t\t\t _(\"error invalidating blocks\"),\n+\t\t\t (unsigned long long)blk,\n+\t\t\t (unsigned long long)blk + num - 1,\n+\t\t\t strerror(ret));\n+}\n+\n+static void fuse2fs_alloc_stats(ext2_filsys fs, blk64_t blk, int inuse)\n+{\n+\tstruct fuse2fs *ff = fs->priv_data;\n+\n+\tif (inuse < 0)\n+\t\tfuse2fs_invalidate_bdev(ff, blk, 1);\n+\tif (ff->old_alloc_stats)\n+\t\tff->old_alloc_stats(fs, blk, inuse);\n+}\n+\n+static void fuse2fs_alloc_stats_range(ext2_filsys fs, blk64_t blk, blk_t num,\n+\t\t\t\t int inuse)\n+{\n+\tstruct fuse2fs *ff = fs->priv_data;\n+\n+\tif (inuse < 0)\n+\t\tfuse2fs_invalidate_bdev(ff, blk, num);\n+\tif (ff->old_alloc_stats_range)\n+\t\tff->old_alloc_stats_range(fs, blk, num, inuse);\n+}\n+\n static int op_iomap_config(const struct fuse_iomap_config_params *p,\n \t\t\t size_t psize, struct fuse_iomap_config *cfg)\n {\n@@ -6322,6 +6369,19 @@ static int op_iomap_config(const struct fuse_iomap_config_params *p,\n \tif (ret)\n \t\tgoto out_unlock;\n \n+\t/*\n+\t * If we let iomap do all file block IO, then we need to watch for\n+\t * freed blocks so that we can invalidate any page cache that might\n+\t * get written to the block deivce.\n+\t */\n+\tif (fuse2fs_iomap_enabled(ff)) {\n+\t\text2fs_set_block_alloc_stats_callback(ff->fs,\n+\t\t\t\tfuse2fs_alloc_stats, &ff->old_alloc_stats);\n+\t\text2fs_set_block_alloc_stats_range_callback(ff->fs,\n+\t\t\t\tfuse2fs_alloc_stats_range,\n+\t\t\t\t&ff->old_alloc_stats_range);\n+\t}\n+\n out_unlock:\n \tfuse2fs_finish(ff, ret);\n \treturn ret;\n", "prefixes": [ "15/19" ] }