get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230299,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230299/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177747214572.4107473.7793388078497205071.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": "<177747214572.4107473.7793388078497205071.stgit@frogsfrogsfrogs>",
    "date": "2026-04-29T14:53:09",
    "name": "[02/19] fuse2fs: add iomap= mount option",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d380a9840487f8b679036e66ad678f619d451491",
    "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/177747214572.4107473.7793388078497205071.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/2230299/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230299/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <SRS0=92tm=C4=vger.kernel.org=linux-ext4+bounces-16191-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=sXsANCUb;\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=92tm=c4=vger.kernel.org=linux-ext4+bounces-16191-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.232.135.74 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=sXsANCUb;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16191-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=\"sXsANCUb\"",
            "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 4g5L003CqNz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 00:53:20 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g5L002jWQz4wLM\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 00:53:20 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4g5L002fBpz4wSR; Thu, 30 Apr 2026 00:53:20 +1000 (AEST)",
            "from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\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 4g5Kzv3QQQz4wLM\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 30 Apr 2026 00:53:15 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id AAB933009099\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 29 Apr 2026 14:53:12 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E8159333445;\n\tWed, 29 Apr 2026 14:53:09 +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 A8B2E2C237C;\n\tWed, 29 Apr 2026 14:53:09 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 842D4C19425;\n\tWed, 29 Apr 2026 14:53:09 +0000 (UTC)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1777474400; cv=pass;\n\tb=CbuSldkz/JNeWS47p2xpGCKSf1YDaFS8A0PQ6Qno06PWG5oU34lsLqPNyfqymxgbz5CU3hcOZLnhqJvLXwhnfh0kWvCsilEeLwAMR/JIxodiI12rnh3l3PThTej0MH8FAfIUTPwe7KqSJ2CDcBi21Y03dtquROyBN8Lw4L7Vs8cjpQllyYSKOVBmA8k95fKBBdbOMu7PDEfPJGgjUweSiWzMZxBktTdE/H36SljMEWvoDJIN0CITfI9SFKc0wCb3vp5eiq+ryaoJagmBob+1Nw7Gg88QdZ9Q3+udXL/L2TulfBXk/jiuk4WSzNT77VnI/+GtPmzPDztltB3iL3abVw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777474389; cv=none;\n b=Sh7U3lSmPhTFvOqwOz4ujkUIZ0901jNJf4voywk2G50SqTbzEUCY1E/91QNvx9SWfXkFGc9pKwaD0SfeZ7ggz1FeNmQWw1ZfKATln0UBX14J/H9HW29ywtNeDKjEXm7+vTwwZXFwxRxhe4X7+Wg/BmlVNBBlNU4E5WxRdVMeRLY="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1777474400; c=relaxed/relaxed;\n\tbh=1c0t2BCwmEBlmGQthmAg1WZGa81/L2wRjIrh3/5xD1M=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=JKisnaPK3vaXsiPOg6bFn56cykfB0y3Hkjs5RNKiwjyrk+a68Y/8eelfD9kgBEABZ7aTw85ZN0Kqo8EylNzzIGFYabF00wKAfZaQECLiKHm0Bqn3QzHOub0aKyTqM9pJY25B5fLvzZU+5z6sLGUnwLgR5Uvfrr99s7Ozkkq8gjtP4mvh9/bx3un82NA+G3F/d7Sgt+jDrIzPAGE0ytCuYbhRPLyRZu1iQoMhAChQTFUc6Rs69ZOqWFiG1B8OepJwp1RijCoPNQstbB56ND/KTx3CAGMjUngNO2RBVa3BGXG4PppdAXbiRT7QmVpT2iUWPoGMNkyIVYsKA+0yntxpNw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777474389; c=relaxed/simple;\n\tbh=hg8Tt5e6KzePgFs+DKkRNj6mEeuqAixcVqx9kvK3h1U=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=rZ2X/RKZaRD6JljwYrkDngHbNFvRkXjBuCkQDzAed9N50+zsv3VpcTqzlW1btIrdF+CPz3mnnLblU+6BzhTwseYDkeylqOYzJFeQt0lt17d6FEuYvlTG0/49U45Q2s+Se/zfIlhxXZNR78+eyiLOVvh+6QoD4WQBHcS4wUlzcd4="
        ],
        "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=sXsANCUb; dkim-atps=neutral;\n spf=pass (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16191-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=sXsANCUb; 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=1777474389;\n\tbh=hg8Tt5e6KzePgFs+DKkRNj6mEeuqAixcVqx9kvK3h1U=;\n\th=Date:Subject:From:To:Cc:In-Reply-To:References:From;\n\tb=sXsANCUbt+wTn81uPOSANeadKtenySsqdv0Re4LW6+CNmz7UPoiAT+twyAUaYbLuN\n\t xn2DgdwcIzhV+qD4QwomyewIhBtfYaAd/b71HWx5yAkudkzLpGR7rZ1yM0vqMam0KE\n\t QXNs+nhK5gzhEmCo1KPVulSGga6ABuq8Fj/zh+YMXFB49HCbIvcBlrNA8+Yo60Iqy6\n\t aD4HXGQss+2RL34x+IgY1EB309X6gpDdMTYkZnq2mJCmqafNiM+E823Kv0ON4GhKsl\n\t QPadELilvY6qjZO+Hqeo7QtAQUaEjfm0WwDRoAfg/fth990HN53boiRj9WbUfzbytG\n\t kUASGz0roRIHw==",
        "Date": "Wed, 29 Apr 2026 07:53:09 -0700",
        "Subject": "[PATCH 02/19] fuse2fs: add iomap= mount option",
        "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": "<177747214572.4107473.7793388078497205071.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\nAdd a mount option to control iomap usage so that we can test before and\nafter scenarios.\n\nSigned-off-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n fuse4fs/fuse4fs.1.in |    6 ++++++\n fuse4fs/fuse4fs.c    |   46 ++++++++++++++++++++++++++++++++++++++++++++++\n misc/fuse2fs.1.in    |    6 ++++++\n misc/fuse2fs.c       |   46 ++++++++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 104 insertions(+)",
    "diff": "diff --git a/fuse4fs/fuse4fs.1.in b/fuse4fs/fuse4fs.1.in\nindex 8bef5f48802385..8855867d27101d 100644\n--- a/fuse4fs/fuse4fs.1.in\n+++ b/fuse4fs/fuse4fs.1.in\n@@ -75,6 +75,12 @@ .SS \"fuse4fs options:\"\n \\fB-o\\fR fuse4fs_debug\n enable fuse4fs debugging\n .TP\n+\\fB-o\\fR iomap=\n+If set to \\fI1\\fR, requires iomap to be enabled.\n+If set to \\fI0\\fR, forbids use of iomap.\n+If set to \\fIdefault\\fR (or not set), enables iomap if present.\n+This substantially improves the performance of the fuse4fs server.\n+.TP\n \\fB-o\\fR kernel\n Behave more like the kernel ext4 driver in the following ways:\n Allows processes owned by other users to access the filesystem.\ndiff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c\nindex a159024f778ba2..df2bda7cc22bf2 100644\n--- a/fuse4fs/fuse4fs.c\n+++ b/fuse4fs/fuse4fs.c\n@@ -236,6 +236,12 @@ enum fuse4fs_opstate {\n \tF4OP_SHUTDOWN,\n };\n \n+enum fuse4fs_feature_toggle {\n+\tFT_DISABLE,\n+\tFT_ENABLE,\n+\tFT_DEFAULT,\n+};\n+\n #ifdef HAVE_FUSE_IOMAP\n enum fuse4fs_iomap_state {\n \tIOMAP_DISABLED,\n@@ -272,6 +278,7 @@ struct fuse4fs {\n \tint blocklog;\n \tint oom_score_adj;\n #ifdef HAVE_FUSE_IOMAP\n+\tenum fuse4fs_feature_toggle iomap_want;\n \tenum fuse4fs_iomap_state iomap_state;\n #endif\n \tunsigned int blockmask;\n@@ -2013,6 +2020,12 @@ static void fuse4fs_iomap_enable(struct fuse_conn_info *conn,\n \n \tif (ff->iomap_state == IOMAP_UNKNOWN)\n \t\tff->iomap_state = IOMAP_DISABLED;\n+\n+\tif (!fuse4fs_iomap_enabled(ff)) {\n+\t\tif (ff->iomap_want == FT_ENABLE)\n+\t\t\terr_printf(ff, \"%s\\n\", _(\"Could not enable iomap.\"));\n+\t\treturn;\n+\t}\n }\n #else\n # define fuse4fs_iomap_enable(...)\t((void)0)\n@@ -6522,6 +6535,9 @@ enum {\n \tFUSE4FS_CACHE_SIZE,\n \tFUSE4FS_DIRSYNC,\n \tFUSE4FS_ERRORS_BEHAVIOR,\n+#ifdef HAVE_FUSE_IOMAP\n+\tFUSE4FS_IOMAP,\n+#endif\n };\n \n #define FUSE4FS_OPT(t, p, v) { t, offsetof(struct fuse4fs, p), v }\n@@ -6553,6 +6569,10 @@ static struct fuse_opt fuse4fs_opts[] = {\n \tFUSE_OPT_KEY(\"cache_size=%s\",\tFUSE4FS_CACHE_SIZE),\n \tFUSE_OPT_KEY(\"dirsync\",\t\tFUSE4FS_DIRSYNC),\n \tFUSE_OPT_KEY(\"errors=%s\",\tFUSE4FS_ERRORS_BEHAVIOR),\n+#ifdef HAVE_FUSE_IOMAP\n+\tFUSE_OPT_KEY(\"iomap=%s\",\tFUSE4FS_IOMAP),\n+\tFUSE_OPT_KEY(\"iomap\",\t\tFUSE4FS_IOMAP),\n+#endif\n \n \tFUSE_OPT_KEY(\"-V\",             FUSE4FS_VERSION),\n \tFUSE_OPT_KEY(\"--version\",      FUSE4FS_VERSION),\n@@ -6604,6 +6624,23 @@ static int fuse4fs_opt_proc(void *data, const char *arg,\n \n \t\t/* do not pass through to libfuse */\n \t\treturn 0;\n+#ifdef HAVE_FUSE_IOMAP\n+\tcase FUSE4FS_IOMAP:\n+\t\tif (strcmp(arg, \"iomap\") == 0 || strcmp(arg + 6, \"1\") == 0)\n+\t\t\tff->iomap_want = FT_ENABLE;\n+\t\telse if (strcmp(arg + 6, \"0\") == 0)\n+\t\t\tff->iomap_want = FT_DISABLE;\n+\t\telse if (strcmp(arg + 6, \"default\") == 0)\n+\t\t\tff->iomap_want = FT_DEFAULT;\n+\t\telse {\n+\t\t\tfprintf(stderr, \"%s: %s\\n\", arg,\n+ _(\"unknown iomap= behavior.\"));\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\t/* do not pass through to libfuse */\n+\t\treturn 0;\n+#endif\n \tcase FUSE4FS_IGNORED:\n \t\treturn 0;\n \tcase FUSE4FS_HELP:\n@@ -6631,6 +6668,9 @@ static int fuse4fs_opt_proc(void *data, const char *arg,\n \t\"    -o cache_size=N[KMG]   use a disk cache of this size\\n\"\n \t\"    -o errors=             behavior when an error is encountered:\\n\"\n \t\"                           continue|remount-ro|panic\\n\"\n+#ifdef HAVE_FUSE_IOMAP\n+\t\"    -o iomap=              0 to disable iomap, 1 to enable iomap\\n\"\n+#endif\n \t\"\\n\",\n \t\t\toutargs->argv[0]);\n \t\tif (key == FUSE4FS_HELPFULL) {\n@@ -6950,6 +6990,7 @@ int main(int argc, char *argv[])\n \t\t.bdev_fd = -1,\n #endif\n #ifdef HAVE_FUSE_IOMAP\n+\t\t.iomap_want = FT_DEFAULT,\n \t\t.iomap_state = IOMAP_UNKNOWN,\n #endif\n \t};\n@@ -6983,6 +7024,11 @@ int main(int argc, char *argv[])\n \tif (fuse4fs_is_service(&fctx))\n \t\tfuse4fs_service_set_proc_cmdline(&fctx, argc, argv, &args);\n \n+#ifdef HAVE_FUSE_IOMAP\n+\tif (fctx.iomap_want == FT_DISABLE)\n+\t\tfctx.iomap_state = IOMAP_DISABLED;\n+#endif\n+\n \t/* /dev/sda -> sda for reporting */\n \tfctx.shortdev = strrchr(fctx.device, '/');\n \tif (fctx.shortdev)\ndiff --git a/misc/fuse2fs.1.in b/misc/fuse2fs.1.in\nindex 6acfa092851292..2b55fa0e723966 100644\n--- a/misc/fuse2fs.1.in\n+++ b/misc/fuse2fs.1.in\n@@ -75,6 +75,12 @@ .SS \"fuse2fs options:\"\n \\fB-o\\fR fuse2fs_debug\n enable fuse2fs debugging\n .TP\n+\\fB-o\\fR iomap=\n+If set to \\fI1\\fR, requires iomap to be enabled.\n+If set to \\fI0\\fR, forbids use of iomap.\n+If set to \\fIdefault\\fR (or not set), enables iomap if present.\n+This substantially improves the performance of the fuse2fs server.\n+.TP\n \\fB-o\\fR kernel\n Behave more like the kernel ext4 driver in the following ways:\n Allows processes owned by other users to access the filesystem.\ndiff --git a/misc/fuse2fs.c b/misc/fuse2fs.c\nindex 63c9b59e54fb04..15ebe6b39f1288 100644\n--- a/misc/fuse2fs.c\n+++ b/misc/fuse2fs.c\n@@ -218,6 +218,12 @@ enum fuse2fs_opstate {\n \tF2OP_SHUTDOWN,\n };\n \n+enum fuse2fs_feature_toggle {\n+\tFT_DISABLE,\n+\tFT_ENABLE,\n+\tFT_DEFAULT,\n+};\n+\n #ifdef HAVE_FUSE_IOMAP\n enum fuse2fs_iomap_state {\n \tIOMAP_DISABLED,\n@@ -254,6 +260,7 @@ struct fuse2fs {\n \tint blocklog;\n \tint oom_score_adj;\n #ifdef HAVE_FUSE_IOMAP\n+\tenum fuse2fs_feature_toggle iomap_want;\n \tenum fuse2fs_iomap_state iomap_state;\n #endif\n \tunsigned int blockmask;\n@@ -1610,6 +1617,12 @@ static void fuse2fs_iomap_enable(struct fuse_conn_info *conn,\n \n \tif (ff->iomap_state == IOMAP_UNKNOWN)\n \t\tff->iomap_state = IOMAP_DISABLED;\n+\n+\tif (!fuse2fs_iomap_enabled(ff)) {\n+\t\tif (ff->iomap_want == FT_ENABLE)\n+\t\t\terr_printf(ff, \"%s\\n\", _(\"Could not enable iomap.\"));\n+\t\treturn;\n+\t}\n }\n #else\n # define fuse2fs_iomap_enable(...)\t((void)0)\n@@ -5753,6 +5766,9 @@ enum {\n \tFUSE2FS_CACHE_SIZE,\n \tFUSE2FS_DIRSYNC,\n \tFUSE2FS_ERRORS_BEHAVIOR,\n+#ifdef HAVE_FUSE_IOMAP\n+\tFUSE2FS_IOMAP,\n+#endif\n };\n \n #define FUSE2FS_OPT(t, p, v) { t, offsetof(struct fuse2fs, p), v }\n@@ -5784,6 +5800,10 @@ static struct fuse_opt fuse2fs_opts[] = {\n \tFUSE_OPT_KEY(\"cache_size=%s\",\tFUSE2FS_CACHE_SIZE),\n \tFUSE_OPT_KEY(\"dirsync\",\t\tFUSE2FS_DIRSYNC),\n \tFUSE_OPT_KEY(\"errors=%s\",\tFUSE2FS_ERRORS_BEHAVIOR),\n+#ifdef HAVE_FUSE_IOMAP\n+\tFUSE_OPT_KEY(\"iomap=%s\",\tFUSE2FS_IOMAP),\n+\tFUSE_OPT_KEY(\"iomap\",\t\tFUSE2FS_IOMAP),\n+#endif\n \n \tFUSE_OPT_KEY(\"-V\",             FUSE2FS_VERSION),\n \tFUSE_OPT_KEY(\"--version\",      FUSE2FS_VERSION),\n@@ -5835,6 +5855,23 @@ static int fuse2fs_opt_proc(void *data, const char *arg,\n \n \t\t/* do not pass through to libfuse */\n \t\treturn 0;\n+#ifdef HAVE_FUSE_IOMAP\n+\tcase FUSE2FS_IOMAP:\n+\t\tif (strcmp(arg, \"iomap\") == 0 || strcmp(arg + 6, \"1\") == 0)\n+\t\t\tff->iomap_want = FT_ENABLE;\n+\t\telse if (strcmp(arg + 6, \"0\") == 0)\n+\t\t\tff->iomap_want = FT_DISABLE;\n+\t\telse if (strcmp(arg + 6, \"default\") == 0)\n+\t\t\tff->iomap_want = FT_DEFAULT;\n+\t\telse {\n+\t\t\tfprintf(stderr, \"%s: %s\\n\", arg,\n+ _(\"unknown iomap= behavior.\"));\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\t/* do not pass through to libfuse */\n+\t\treturn 0;\n+#endif\n \tcase FUSE2FS_IGNORED:\n \t\treturn 0;\n \tcase FUSE2FS_HELP:\n@@ -5862,6 +5899,9 @@ static int fuse2fs_opt_proc(void *data, const char *arg,\n \t\"    -o cache_size=N[KMG]   use a disk cache of this size\\n\"\n \t\"    -o errors=             behavior when an error is encountered:\\n\"\n \t\"                           continue|remount-ro|panic\\n\"\n+#ifdef HAVE_FUSE_IOMAP\n+\t\"    -o iomap=              0 to disable iomap, 1 to enable iomap\\n\"\n+#endif\n \t\"\\n\",\n \t\t\toutargs->argv[0]);\n \t\tif (key == FUSE2FS_HELPFULL) {\n@@ -6013,6 +6053,7 @@ int main(int argc, char *argv[])\n \t\t.oom_score_adj = -500,\n \t\t.opstate = F2OP_WRITABLE,\n #ifdef HAVE_FUSE_IOMAP\n+\t\t.iomap_want = FT_DEFAULT,\n \t\t.iomap_state = IOMAP_UNKNOWN,\n #endif\n \t};\n@@ -6029,6 +6070,11 @@ int main(int argc, char *argv[])\n \t\texit(1);\n \t}\n \n+#ifdef HAVE_FUSE_IOMAP\n+\tif (fctx.iomap_want == FT_DISABLE)\n+\t\tfctx.iomap_state = IOMAP_DISABLED;\n+#endif\n+\n \t/* /dev/sda -> sda for reporting */\n \tfctx.shortdev = strrchr(fctx.device, '/');\n \tif (fctx.shortdev)\n",
    "prefixes": [
        "02/19"
    ]
}