get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226960,
    "url": "http://patchwork.ozlabs.org/api/patches/2226960/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177689989700.3821326.9217649391848833281.stgit@frogsfrogsfrogs/",
    "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": "<177689989700.3821326.9217649391848833281.stgit@frogsfrogsfrogs>",
    "list_archive_url": null,
    "date": "2026-04-22T23:25:56",
    "name": "[09/10] fuse4fs: make MMP work correctly in safe service mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ddebc3165ea0609997058c8326c1128f05efb600",
    "submitter": {
        "id": 77032,
        "url": "http://patchwork.ozlabs.org/api/people/77032/?format=api",
        "name": "Darrick J. Wong",
        "email": "djwong@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177689989700.3821326.9217649391848833281.stgit@frogsfrogsfrogs/mbox/",
    "series": [
        {
            "id": 501127,
            "url": "http://patchwork.ozlabs.org/api/series/501127/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=501127",
            "date": "2026-04-22T23:23:47",
            "name": "[01/10] libext2fs: make it possible to extract the fd from an IO manager",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501127/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226960/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226960/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=P8Vk=CV=vger.kernel.org=linux-ext4+bounces-16013-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=Ro/WeVm7;\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=p8vk=cv=vger.kernel.org=linux-ext4+bounces-16013-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c09:e001:a7::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=Ro/WeVm7;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16013-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=\"Ro/WeVm7\"",
            "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 4g1Fhs36zVz1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 09:26:05 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g1Fhs25ltz4wHx\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 09:26:05 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4g1Fhs21SKz4wKW; Thu, 23 Apr 2026 09:26:05 +1000 (AEST)",
            "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::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 4g1Fhn4g2Vz4wHx\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 23 Apr 2026 09:26:01 +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 3F2AB30008BD\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 22 Apr 2026 23:25:58 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0BC153A3833;\n\tWed, 22 Apr 2026 23:25:57 +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 C1C1F3603EC;\n\tWed, 22 Apr 2026 23:25:56 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 9B91DC2BCAF;\n\tWed, 22 Apr 2026 23:25:56 +0000 (UTC)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776900365; cv=pass;\n\tb=nuZjkx0iQug2QgdvNvvn6uZFiFjtTx/dmbf+02qQWLS/89kLMNX1gP1dhhIqSXCzCnutU/eS0Xm51iue6K9F5g1V3IngXTlMJltCVBJn7JsP0CO5GtljeYSNiMxQgxIgqAQ5rox5xC7rY0Ku1WTnYya4ZjwB5sG61k4Yw/IfswR4fGxGgHLo21NSbQIQ9kGNWutlznpIdlOz5QnadPhPkvLEHW2qIvjkCfJhIQAP7Hvflct+BrxauuF9SzNcyPW6WLF9rLtDP4QUB6lpK/ZH7Guw7Zb6ZMXKFRZedgtIOAFI4iYHEKBpEsp4qXWTtV2dfHUxTfmOVfgrfO6ePFcLtw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776900356; cv=none;\n b=sh8sIFCUZvXIlTWC6RRlU4TCavjz9cJ3uszjjuuoyn4xa3i3J701E2tDKAMhAGwEA+ykxd3+GTMOlnnx7Vsb/U8RcaPWNC5L/yw72tY5vwgMogtrbKWhncDlFO3Nb+WVMX0JdUB4yyt2RZIn8HE/g6KKH3izRAX2yB2cSHJ8qzM="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776900365; c=relaxed/relaxed;\n\tbh=fUoc+EuQlzwurvBBzphUYeJxgxdvM7KVYgMbRsnzqSY=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=RdFQUhubh7db5WRiv1/1GyCnD6bhmwM0GCxebTVS7lR+dYwUkaz6SOUGXxf7ey/dHJUTEbt5otfK29NnsgjBNEpMIy2wuNTR3yrcrkBa+5ZVSDxC9YK4GzVao6c03gF4fo18Svfhq0TD1pr88cnj+TdtLppWqRh0/15ggDwm/cVj4xkXQO/cY52RWWEeia6aHkjL63jtnBd8l2zyw5AqIxKN5C1Q+21F5+AUGu33vBpWONcRKCdKwAA/ZFdTSZja9qqF6ctoNUAf+UttJh2leYINvvDXQUn7rDWN0yaG7HUK2n7jDirYrGK3sKITtKvREUxHFxUtR8rgvpFWDD4/KA==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776900356; c=relaxed/simple;\n\tbh=QvSSXDex8smHOkznZ+/6hUxMFthQJek3R92yjQYyDkg=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=cJGMBnfOO+oun0J8+n+Ko/vZ74evBbrWmRB6L5tQOWJU8n2s4czewJb3swnJGQHPgC+OKq2/+AoKhXLfyIJL/kloVFjlbjHRCRiqI5H0pNr+jhfkm9MhZft3KQUyU8OPgmtVDehVT5g6zYzdUMDMcv2w5nmpSUwpyiZC7t9k4Fc="
        ],
        "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=Ro/WeVm7; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16013-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=Ro/WeVm7; 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=1776900356;\n\tbh=QvSSXDex8smHOkznZ+/6hUxMFthQJek3R92yjQYyDkg=;\n\th=Date:Subject:From:To:Cc:In-Reply-To:References:From;\n\tb=Ro/WeVm7axKSDjSBFw0dE23ZOGbyfqkuLBdhS42Wgar7cetc/gzg+gG1+LaQMFKBu\n\t 4D+BAblkTmlxL4Ermgr0wwy8axHHKcnp016mOwPhWukHeG3QHHg+2w0VEgF7xvFKgS\n\t TeYt1gjBQLGnTIHx9eSvnwWCTX3s9W7yghdBW5vriX4Snb8GSTpPW+26Ep+p9VCNgu\n\t x4T+pTmpozGOM/T0ORW7eA97Q1OeejrY3HRqAeBifVjIu/vOy4HnGMijYBEI/UT3Oo\n\t Jf6FCqqX89aJxZWTRnIjCRdoqtuwkR2DyMSAUG0sNhErHjNEdtGM3iO0a/j/S8bI9w\n\t 5/pM2/plQx+JA==",
        "Date": "Wed, 22 Apr 2026 16:25:56 -0700",
        "Subject": "[PATCH 09/10] fuse4fs: make MMP work correctly in safe service mode",
        "From": "\"Darrick J. Wong\" <djwong@kernel.org>",
        "To": "tytso@mit.edu",
        "Cc": "linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev,\n linux-ext4@vger.kernel.org, neal@gompa.dev, joannelkoong@gmail.com,\n miklos@szeredi.hu, bernd@bsbernd.com",
        "Message-ID": "<177689989700.3821326.9217649391848833281.stgit@frogsfrogsfrogs>",
        "In-Reply-To": "<177689989498.3821326.15497525132012299039.stgit@frogsfrogsfrogs>",
        "References": "<177689989498.3821326.15497525132012299039.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\nNormally, the libext2fs MMP code open()s a complete separate file\ndescriptor to read and write the MMP block so that it can have its own\nprivate open file with its own access mode and file position.  However,\nif the unixfd IO manager is in use, it will reuse the io channel, which\nmeans that MMP and the unixfd share the same open file and hence the\naccess mode and file position.\n\nMMP requires directio access to block devices so that changes are\nimmediately visible on other nodes.  Therefore, we need the IO channel\n(and thus the filesystem) to be running in directio mode if MMP is in\nuse.\n\nTo make this work correctly with the sole unixfd IO manager user\n(fuse4fs in unprivileged service mode), we must set O_DIRECT on the\nbdev fd and mount the filesystem in directio mode.\n\nSigned-off-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n fuse4fs/fuse4fs.c |   51 ++++++++++++++++++++++++++++++++++++++++++++++++---\n 1 file changed, 48 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c\nindex bf7c8ef9102a7a..dc5a0ede9f5072 100644\n--- a/fuse4fs/fuse4fs.c\n+++ b/fuse4fs/fuse4fs.c\n@@ -1371,12 +1371,57 @@ static int fuse4fs_service_get_config(struct fuse4fs *ff)\n }\n \n static errcode_t fuse4fs_service_openfs(struct fuse4fs *ff, char *options,\n-\t\t\t\t\tint flags)\n+\t\t\t\t\tint *flags)\n {\n+\tstruct stat statbuf;\n \tchar path[64];\n+\terrcode_t retval;\n+\tint ret;\n \n+\tret = fstat(ff->bdev_fd, &statbuf);\n+\tif (ret)\n+\t\treturn errno;\n+\n+\t/*\n+\t * Open the filesystem with SKIP_MMP so that we can find out if the\n+\t * filesystem actually has MMP.\n+\t */\n \tsnprintf(path, sizeof(path), \"/dev/fd/%d\", ff->bdev_fd);\n-\treturn ext2fs_open2(path, options, flags, 0, 0, unixfd_io_manager,\n+\tretval = ext2fs_open2(path, options, *flags | EXT2_FLAG_SKIP_MMP, 0, 0,\n+\t\t\t      unixfd_io_manager, &ff->fs);\n+\tif (retval)\n+\t\treturn retval;\n+\n+\t/*\n+\t * If the fs doesn't have MMP then we're good to go.  Otherwise close\n+\t * the filesystem so that we can reopen it with MMP enabled.\n+\t */\n+\tif (!ext2fs_has_feature_mmp(ff->fs->super))\n+\t\treturn 0;\n+\n+\tretval = ext2fs_close_free(&ff->fs);\n+\tif (retval)\n+\t\treturn retval;\n+\n+\t/*\n+\t * If the filesystem is not on a regular file, MMP will share the same\n+\t * fd as the unixfd IO channel.  We need to set O_DIRECT on the bdev_fd\n+\t * and open the filesystem in directio mode.\n+\t */\n+\tif (!S_ISREG(statbuf.st_mode)) {\n+\t\tint fflags = fcntl(ff->bdev_fd, F_GETFL);\n+\n+\t\tif (!(fflags & O_DIRECT)) {\n+\t\t\tret = fcntl(ff->bdev_fd, F_SETFL, fflags | O_DIRECT);\n+\t\t\tif (ret)\n+\t\t\t\treturn EXT2_ET_MMP_OPEN_DIRECT;\n+\t\t}\n+\n+\t\tff->directio = 1;\n+\t\t*flags |= EXT2_FLAG_DIRECT_IO;\n+\t}\n+\n+\treturn ext2fs_open2(path, options, *flags, 0, 0, unixfd_io_manager,\n \t\t\t    &ff->fs);\n }\n #else\n@@ -1516,7 +1561,7 @@ static errcode_t fuse4fs_open(struct fuse4fs *ff)\n \tdeadline = init_deadline(FUSE4FS_OPEN_TIMEOUT);\n \tdo {\n \t\tif (fuse4fs_is_service(ff))\n-\t\t\terr = fuse4fs_service_openfs(ff, options, flags);\n+\t\t\terr = fuse4fs_service_openfs(ff, options, &flags);\n \t\telse\n \t\t\terr = ext2fs_open2(ff->device, options, flags, 0, 0,\n \t\t\t\t\t   unix_io_manager, &ff->fs);\n",
    "prefixes": [
        "09/10"
    ]
}