get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221663,
    "url": "http://patchwork.ozlabs.org/api/patches/2221663/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260410054750.18283-1-wegao@suse.com/",
    "project": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/projects/59/?format=api",
        "name": "Linux Test Project development",
        "link_name": "ltp",
        "list_id": "ltp.lists.linux.it",
        "list_email": "ltp@lists.linux.it",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260410054750.18283-1-wegao@suse.com>",
    "list_archive_url": null,
    "date": "2026-04-10T05:47:40",
    "name": "[v4] fsconfig04.c: Check FSCONFIG_SET_PATH",
    "commit_ref": null,
    "pull_url": null,
    "state": "needs-review-ack",
    "archived": false,
    "hash": "ef0120f7e736375a58a8c9927634ac70616c6627",
    "submitter": {
        "id": 85577,
        "url": "http://patchwork.ozlabs.org/api/people/85577/?format=api",
        "name": "Wei Gao",
        "email": "wegao@suse.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260410054750.18283-1-wegao@suse.com/mbox/",
    "series": [
        {
            "id": 499397,
            "url": "http://patchwork.ozlabs.org/api/series/499397/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=499397",
            "date": "2026-04-10T05:47:40",
            "name": "[v4] fsconfig04.c: Check FSCONFIG_SET_PATH",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/499397/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221663/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221663/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ltp@lists.linux.it"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ltp@picard.linux.it"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=lists.linux.it header.i=@lists.linux.it\n header.a=rsa-sha256 header.s=picard header.b=AMsVxFlR;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256\n header.s=google header.b=NUHNpG1e;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fsQnf3mwSz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 15:48:03 +1000 (AEST)",
            "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id D03653E2694\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 07:48:00 +0200 (CEST)",
            "from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 204383E149F\n for <ltp@lists.linux.it>; Fri, 10 Apr 2026 07:47:55 +0200 (CEST)",
            "from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n [IPv6:2a00:1450:4864:20::436])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 1711B1A0081A\n for <ltp@lists.linux.it>; Fri, 10 Apr 2026 07:47:54 +0200 (CEST)",
            "by mail-wr1-x436.google.com with SMTP id\n ffacd0b85a97d-43b949bf4easo937961f8f.0\n for <ltp@lists.linux.it>; Thu, 09 Apr 2026 22:47:54 -0700 (PDT)",
            "from localhost ([2a07:de40:b240:0:2ad6:ed42:2ad6:ed42])\n by smtp.gmail.com with UTF8SMTPSA id\n ffacd0b85a97d-43d63e5061fsm4433301f8f.30.2026.04.09.22.47.52\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 22:47:52 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it;\n i=@lists.linux.it; q=dns/txt; s=picard; t=1775800080; h=to : date :\n message-id : in-reply-to : references : mime-version : subject :\n list-id : list-unsubscribe : list-archive : list-post : list-help :\n list-subscribe : from : reply-to : content-type :\n content-transfer-encoding : sender : from;\n bh=wDpT6EiG8ALmCxYEgVfJOTc+vvNzSYgLxnr4r0x4+WQ=;\n b=AMsVxFlRXa0rRkNPuAY7X0PqUAKXPs994Zux89sYn/fvP98QeMyngfu3goCtoeghWsBnI\n cElZuSkqwIq0cdm4mKOR6xnk0pfaI3hSQC3kIj5sfxYGVm9leU4q8qvOStaMfYkt2s3eK4P\n /NTVtU3HHnLyECbK4S/iNwTOFny6DRE=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=suse.com; s=google; t=1775800073; x=1776404873; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=Ud//P3rL+V/d77Oq7c/MCMUc85CtJBz9By+ouumU8k0=;\n b=NUHNpG1emifgJm3OQt6zVo0UqQ28gIe20IbsHPxvk5FL2aKkf7AZUiCujo8RxqheDo\n tULAwqN+Fbda8Mf3oCR/X8LaiugnsZ4ms+bOZxqKUwt49jbOvJjND45KL+eA5X4lCk7d\n UncFnbNvPxCJTIqMsNl8BBNxAoZM8cdxKKqRAP7oIGUPtNY48E5RHHKw4gnuauafsbhy\n 3vhUyhLK1oLZ9c/sJPft/3N+rKbzbLxheCEJK7LplInuW+wZZF/WD9lVeCYmrysvsfCU\n WKo/CHEtKIV7wMSn7v3wTnzsU8G43koVwp1GdRck05bWpN5Nh4Jub1gWeWjxqg2pVRmU\n FSug=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775800073; x=1776404873;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=Ud//P3rL+V/d77Oq7c/MCMUc85CtJBz9By+ouumU8k0=;\n b=T1VSPZLLbHUPjmAtewlcclcsdE0oqYDsPyMWLCiXAmVNT8KoxuC31vkMHejzf7fNn/\n LfiybFHx4gv9+/H2fwetR5ucLjW5fEVF3QBA3lzyQ3MPjxY+I3pixuD01u+xKZcbE7sk\n 2HbQCN2hT8pp8Z/O1VnuMTlVBC2vMp1fhvq6uQiNgufp7/TFLOdqTwObyn5Q2bGAxRHu\n 1qty+IbqU+mKcGJN5S6DmVDJ1Q6va+V+DYzMX9Yh0L68xehBDxWQKjYSCD2T9CySJu0d\n a3L43QzteZQkwUd63D/t/EmucN72JKWpLPU7RcofuZHF3SRaLnNG9EKcHJ1kNp4iYel7\n rfGA==",
        "X-Gm-Message-State": "AOJu0YxhF2SKBUFxTQZs6TQGpjTefzEMaXl7b5W05dGcRDzPiGdk8e3M\n Jzr8qf0MvY+xR8C3IV/+y59aTOqk7MBUQaNAjcsv/ZmVXAGZMCy3xYkit/6hXh540AtUx4lv0W7\n Obk0=",
        "X-Gm-Gg": "AeBDiesLSFFnLc1QGJNizrtjenooD4MIlyKRc6MnF5pONWdG+rD2/2OYk7nstCns6SC\n IRe4m3Kg3MWsNVf8xx6S6N/7WvpMjwjC1Fx5yGMMqu9JzbTb8zohma6jYMTmN4J/7gd7FzqkAH/\n qnSbj88WlLDpJlH2Pq8TWVSGyQuDmYTnRmOqHMI/bDFdYlbqiEA7AWjPOiZG7mxAs40tKiHdywv\n x49LzifT02XnIxGqxUlffxdYT//adsZVjKv+WgA8T2aNRS8i2qZvyTAO7xA3fiirFU9dTd0v7LX\n 5tROz/xVQja3OnRyu8BeMH2b7PsTnMOQeg2YuXLj+UOfmds+3TrTYA+E/GS01LFdOlln+nAOVQb\n wmipDWk6rdv+ZHeQJh0cmFR5+vOvDidtOkLuTZBB6pXEIR9c9PwZOwLvK437EOcbtfJVHPJM/89\n Bixef9p1+aCOo=",
        "X-Received": "by 2002:a05:6000:1866:b0:43d:1bf6:91b with SMTP id\n ffacd0b85a97d-43d649741f7mr2340500f8f.16.1775800073126;\n Thu, 09 Apr 2026 22:47:53 -0700 (PDT)",
        "To": "ltp@lists.linux.it",
        "Date": "Fri, 10 Apr 2026 05:47:40 +0000",
        "Message-ID": "<20260410054750.18283-1-wegao@suse.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250603214503.3792293-1-wegao@suse.com>",
        "References": "<20250603214503.3792293-1-wegao@suse.com>",
        "MIME-Version": "1.0",
        "X-Spam-Status": "No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-3.smtp.seeweb.it",
        "X-Virus-Scanned": "clamav-milter 1.0.9 at in-3.smtp.seeweb.it",
        "X-Virus-Status": "Clean",
        "Subject": "[LTP] [PATCH v4] fsconfig04.c: Check FSCONFIG_SET_PATH",
        "X-BeenThere": "ltp@lists.linux.it",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux Test Project <ltp.lists.linux.it>",
        "List-Unsubscribe": "<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>",
        "List-Archive": "<http://lists.linux.it/pipermail/ltp/>",
        "List-Post": "<mailto:ltp@lists.linux.it>",
        "List-Help": "<mailto:ltp-request@lists.linux.it?subject=help>",
        "List-Subscribe": "<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>",
        "From": "Wei Gao via ltp <ltp@lists.linux.it>",
        "Reply-To": "Wei Gao <wegao@suse.com>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it",
        "Sender": "\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"
    },
    "content": "Fixes: https://github.com/linux-test-project/ltp/issues/1169\n\nThe fsconfig01.c does not test if FSCONFIG_SET_PATH have any effect,\nmost of the calls there just set dummy \"sync\" parameter. This test\ncase aims to verify if the FSCONFIG_SET_PATH operation can be used\nto dynamically change the external journal device of ext3 or ext4\nfilesystem.\n\nSigned-off-by: Wei Gao <wegao@suse.com>\n---\nv3->v4:\n- Replace popen to SAFE_POPEN\n\n runtest/syscalls                              |   1 +\n testcases/kernel/syscalls/fsconfig/.gitignore |   1 +\n .../kernel/syscalls/fsconfig/fsconfig04.c     | 163 ++++++++++++++++++\n 3 files changed, 165 insertions(+)\n create mode 100644 testcases/kernel/syscalls/fsconfig/fsconfig04.c",
    "diff": "diff --git a/runtest/syscalls b/runtest/syscalls\nindex d72fceb5e..49ba7d845 100644\n--- a/runtest/syscalls\n+++ b/runtest/syscalls\n@@ -422,6 +422,7 @@ fremovexattr02 fremovexattr02\n fsconfig01 fsconfig01\n fsconfig02 fsconfig02\n fsconfig03 fsconfig03\n+fsconfig04 fsconfig04\n \n fsmount01 fsmount01\n fsmount02 fsmount02\ndiff --git a/testcases/kernel/syscalls/fsconfig/.gitignore b/testcases/kernel/syscalls/fsconfig/.gitignore\nindex cfedae5f7..bd3754c34 100644\n--- a/testcases/kernel/syscalls/fsconfig/.gitignore\n+++ b/testcases/kernel/syscalls/fsconfig/.gitignore\n@@ -1,3 +1,4 @@\n /fsconfig01\n /fsconfig02\n /fsconfig03\n+/fsconfig04\ndiff --git a/testcases/kernel/syscalls/fsconfig/fsconfig04.c b/testcases/kernel/syscalls/fsconfig/fsconfig04.c\nnew file mode 100644\nindex 000000000..c6ff17f40\n--- /dev/null\n+++ b/testcases/kernel/syscalls/fsconfig/fsconfig04.c\n@@ -0,0 +1,163 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Copyright (c) 2025 Wei Gao <wegao@suse.com>\n+ */\n+\n+/*\\\n+ * This test aims to validate the functionality of fsconfig(FSCONFIG_SET_PATH) in\n+ * dynamically altering the external journal device of a ext3 or ext4 filesystem.\n+ * Case acquires three loop devices (dev0, dev1, dev2), it formats dev1 and dev2\n+ * as external journal devices using the -O journal_dev option and assigns them\n+ * the same UUID. Then formats dev0 (the main filesystem) multiple times, first\n+ * associating it with dev1, then change to dev2, finally back to dev1 again as\n+ * an external journal using the -J device= option.\n+ *\n+ * 2 workarounds in this case need mention:\n+ *\n+ * - To avoid \"journal UUID does not match\" error when switch external journal device\n+ *   we have to assign same UUID to dev1/dev2\n+ * - Before fsconfig test we have to formats dev0 associating to dev1->dev2->dev1,\n+ *   this will make sure both dev1/2's supper block contain correct content. Otherwise\n+ *   you will encounter error such as \"EXT4-fs (loop0): External journal has more than\n+ *   one user (unsupported) - 0\" when switch external journal device using fsconfig.\n+ */\n+\n+#include \"tst_test.h\"\n+#include \"tst_safe_stdio.h\"\n+#include \"lapi/fsmount.h\"\n+#include \"old/tso_device.h\"\n+\n+#define MNTPOINT\t\"mntpoint\"\n+#define LOOP_DEV_SIZE 10\n+#define UUID \"d73c9e5e-97e4-4a9c-b17e-75a931b02660\"\n+\n+static int fd;\n+static const char *dev;\n+static char dev0[NAME_MAX];\n+static char dev1[NAME_MAX];\n+static char dev2[NAME_MAX];\n+\n+static void cleanup(void)\n+{\n+\tif (fd != -1)\n+\t\tSAFE_CLOSE(fd);\n+\n+\tTST_EXP_PASS_SILENT(tst_detach_device(dev1));\n+\tTST_EXP_PASS_SILENT(tst_detach_device(dev2));\n+}\n+\n+static void setup(void)\n+{\n+\tstrcpy(dev0, tst_device->dev);\n+\tdev = tst_acquire_loop_device(LOOP_DEV_SIZE, \"dev1_file\");\n+\tif (!dev)\n+\t\ttst_brk(TBROK, \"acquire loop dev1 failed\");\n+\n+\tstrcpy(dev1, dev);\n+\tdev = NULL;\n+\n+\tdev = tst_acquire_loop_device(LOOP_DEV_SIZE, \"dev2_file\");\n+\tif (!dev)\n+\t\ttst_brk(TBROK, \"acquire loop dev2 failed\");\n+\tstrcpy(dev2, dev);\n+\n+\tconst char *const *mkfs_opts_set_UUID;\n+\tconst char *const *mkfs_opts_set_journal_dev1;\n+\tconst char *const *mkfs_opts_set_journal_dev2;\n+\n+\tmkfs_opts_set_UUID = (const char *const []) {\"-F\", \"-U\", UUID,\n+\t\t\"-O journal_dev\", NULL};\n+\n+\tchar device_option_dev1[PATH_MAX];\n+\tchar device_option_dev2[PATH_MAX];\n+\n+\tsprintf(device_option_dev1, \"device=%s\", dev1);\n+\tsprintf(device_option_dev2, \"device=%s\", dev2);\n+\n+\tmkfs_opts_set_journal_dev1 = (const char *const []) {\"-F\", \"-J\",\n+\t\tdevice_option_dev1, NULL};\n+\n+\tmkfs_opts_set_journal_dev2 = (const char *const []) {\"-F\", \"-J\",\n+\t\tdevice_option_dev2, NULL};\n+\n+\tSAFE_MKFS(dev1, tst_device->fs_type, mkfs_opts_set_UUID, NULL);\n+\tSAFE_MKFS(dev2, tst_device->fs_type, mkfs_opts_set_UUID, NULL);\n+\tSAFE_MKFS(dev0, tst_device->fs_type, mkfs_opts_set_journal_dev1, NULL);\n+\tSAFE_MKFS(dev0, tst_device->fs_type, mkfs_opts_set_journal_dev2, NULL);\n+\tSAFE_MKFS(dev0, tst_device->fs_type, mkfs_opts_set_journal_dev1, NULL);\n+}\n+\n+static void run(void)\n+{\n+\tTEST(fd = fsopen(tst_device->fs_type, 0));\n+\tif (fd == -1)\n+\t\ttst_brk(TBROK | TTERRNO, \"fsopen() failed\");\n+\n+\tTEST(fsconfig(fd, FSCONFIG_SET_STRING, \"source\", dev0, 0));\n+\tif (TST_RET == -1)\n+\t\ttst_brk(TFAIL | TTERRNO, \"fsconfig(FSCONFIG_SET_STRING) failed\");\n+\n+\tTEST(fsconfig(fd, FSCONFIG_SET_PATH, \"journal_path\", dev2, 0));\n+\tif (TST_RET == -1) {\n+\t\tif (TST_ERR == EOPNOTSUPP)\n+\t\t\ttst_brk(TCONF, \"fsconfig(FSCONFIG_SET_PATH) not supported\");\n+\t\telse\n+\t\t\ttst_brk(TFAIL | TTERRNO, \"fsconfig(FSCONFIG_SET_PATH) failed\");\n+\t}\n+\n+\tTEST(fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0));\n+\tif (TST_RET == -1)\n+\t\ttst_brk(TFAIL | TTERRNO, \"fsconfig(FSCONFIG_CMD_CREATE) failed\");\n+\n+\tchar loop_name[NAME_MAX];\n+\tchar path[PATH_MAX];\n+\tchar device_str[NAME_MAX];\n+\tunsigned int major, minor, device_num;\n+\tunsigned int found = 0;\n+\n+\tSAFE_SSCANF(dev2, \"/dev/%s\", loop_name);\n+\n+\tsnprintf(path, sizeof(path), \"/sys/block/%s/dev\", loop_name);\n+\tSAFE_FILE_SCANF(path, \"%u:%u\", &major, &minor);\n+\tdevice_num = (major << 8) | minor;\n+\tsnprintf(device_str, sizeof(device_str), \"0x%04X\", device_num);\n+\n+\tchar line[PATH_MAX];\n+\tFILE *tune2fs;\n+\n+\tsprintf(path, \"tune2fs -l %s 2>&1\", dev0);\n+\ttune2fs = SAFE_POPEN(path, \"r\");\n+\n+\twhile (fgets(line, PATH_MAX, tune2fs)) {\n+\t\tif (*line && strstr(line, \"Journal device:\") && strstr(line, device_str)) {\n+\t\t\tfound = 1;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tif (found == 1)\n+\t\ttst_res(TPASS, \"Device found in journal\");\n+\telse\n+\t\ttst_res(TFAIL, \"Device not found in journal\");\n+\n+\tpclose(tune2fs);\n+\tSAFE_CLOSE(fd);\n+}\n+\n+static struct tst_test test = {\n+\t.test_all = run,\n+\t.setup = setup,\n+\t.cleanup = cleanup,\n+\t.needs_root = 1,\n+\t.format_device = 1,\n+\t.mntpoint = MNTPOINT,\n+\t.needs_cmds = (const char *[]) {\n+\t\t\"tune2fs\",\n+\t\tNULL\n+\t},\n+\t.filesystems = (struct tst_fs []) {\n+\t\t{.type = \"ext3\"},\n+\t\t{.type = \"ext4\"},\n+\t\t{}\n+\t},\n+};\n",
    "prefixes": [
        "v4"
    ]
}