Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196950/?format=api
{ "id": 2196950, "url": "http://patchwork.ozlabs.org/api/patches/2196950/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260216164848.3074-4-jack@suse.cz/", "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": "<20260216164848.3074-4-jack@suse.cz>", "list_archive_url": null, "date": "2026-02-16T16:48:44", "name": "[2/2] ext4: Fix fsync(2) for nojournal mode", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2b8830a608a51961cd102a181d86a7b7e1b27219", "submitter": { "id": 363, "url": "http://patchwork.ozlabs.org/api/people/363/?format=api", "name": "Jan Kara", "email": "jack@suse.cz" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260216164848.3074-4-jack@suse.cz/mbox/", "series": [ { "id": 492331, "url": "http://patchwork.ozlabs.org/api/series/492331/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=492331", "date": "2026-02-16T16:48:43", "name": "ext4: nojournal mode fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492331/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196950/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196950/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=KOKw=AU=vger.kernel.org=linux-ext4+bounces-13705-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 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=kokw=au=vger.kernel.org=linux-ext4+bounces-13705-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=none (p=none dis=none) header.from=suse.cz", "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-13705-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=195.135.223.130", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=suse.cz", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=suse.cz", "smtp-out1.suse.de;\n\tnone" ], "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 4fF8221yzSz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 03:51:54 +1100 (AEDT)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fF8221Cz2z4wCk\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 03:51:54 +1100 (AEDT)", "by gandalf.ozlabs.org (Postfix)\n\tid 4fF8220d91z4wMV; Tue, 17 Feb 2026 03:51:54 +1100 (AEDT)", "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 4fF81y195Fz4wCk\n\tfor <patchwork-incoming@ozlabs.org>; Tue, 17 Feb 2026 03:51:50 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 983FA3039F70\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 16 Feb 2026 16:49:17 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 508C72737F2;\n\tMon, 16 Feb 2026 16:49:15 +0000 (UTC)", "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 121DE242D6C\n\tfor <linux-ext4@vger.kernel.org>; Mon, 16 Feb 2026 16:49:13 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby smtp-out1.suse.de (Postfix) with ESMTPS id 14EA33E890;\n\tMon, 16 Feb 2026 16:49:07 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7137A3EA65;\n\tMon, 16 Feb 2026 16:49:05 +0000 (UTC)", "from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n\tby imap1.dmz-prg2.suse.org with ESMTPSA\n\tid BXSgG4FKk2n5OwAAD6G6ig\n\t(envelope-from <jack@suse.cz>); Mon, 16 Feb 2026 16:49:05 +0000", "by quack3.suse.cz (Postfix, from userid 1000)\n\tid 9E710A0B4F; Mon, 16 Feb 2026 17:48:53 +0100 (CET)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1771260714; cv=pass;\n\tb=ggcSSdLW7R3xbtS5nF2MbOxC/9yAfGuEtb9EY6Dr7hdv94W70j35XQNqa1PytFhQ7J2ZG11AnYfQ3Ird/EUNwfV40fEe4dTj6Zp2xXSgdkYYkmTYt2enmcP08925eUXloSirZcXfUgAz+F+SrPc4xYxHqoRtiGmmybO/JppJWFygvtwJnCtQesuyJHE6SBLrD1SNELMkuG5BFcwHjlJAGNLE0SiV1kZJOoxo2Z1Y99hS0UKjJxcfw8ADxthq9MExXwvsWxumxfuVK4PuD85lZ9ZxnjK/6z/vEOY173AxsXjoe2Q7LUceoNff3LAiZLgjv7NKYRQBDBZLpme/C8yLxg==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771260555; cv=none;\n b=Ub9DWiAyg5V7yHWtV25y91YbXwZmO8UNRhlD694Faki0xMfYw1Zhnp6XCeb/mzjwkicUG0euFYmPRgxitfyE2YH3tslGbxXgkSp+mf/6bGJUlfc+quciaET7JhI/mRfVuDFlx93OAKlMNophJ1Ez6xLAaojfosG9e4MGArEyeh4=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1771260714; c=relaxed/relaxed;\n\tbh=hay7q+CQftjomAyUjL4jsEwlKq0jbg04bHAhmA+sb84=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=NqFy8qsJjS4B/q/Rvkt3Y/iZ2CbD9hCNjWCw6MjUaIFCT/VE+AUfRnQymUzRGnVjHA+ZClOkANvWPqKtNp6kUdks/rYdjNFxU5f2ekmK2rYuLDIfN8YPeN7tUAGWx5OPOJlDRBTevLeVfM2y3kMjxw5FCTVN1RBrRcDDkgT2LKl3MpfP75eohWEUovP70o7amBdWZQmSS+dtSQz/9E4Vq6nAZ/QdZiLK0x2yaaFA56N44N5Vbn0AujhZjnKyg0Oh9OsjRLKkCLcKfGUpMMdESTES6DzGxqA0Hw7uGSfKpkMJhkp2kD6AfRUh16Yla5B2zoUd1DM2fkxUHvKmYXUUEg==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771260555; c=relaxed/simple;\n\tbh=dyj19ZhdVKL7uG64tncRok+1Kd5QGtnLKMX3tiEjlJ4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=oinDz6Bu1rbquKmMsCN/qZ6KMmcw0IYX5UIpXDQvmtz4lyuLByrsT+2yEUfGMR8gc2gR6DFN1gXuI/tORMWi3tEEAaesoGATJvZisw6wr9/K5FxAIM713RKIQevXPdJBRjY2uba1BGOvQa84RexfUn23KHIwmEAYQMynqBqV2wk=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=suse.cz;\n spf=pass (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-13705-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=suse.cz;\n spf=pass smtp.mailfrom=suse.cz; arc=none smtp.client-ip=195.135.223.130" ], "From": "Jan Kara <jack@suse.cz>", "To": "Ted Tso <tytso@mit.edu>", "Cc": "<linux-ext4@vger.kernel.org>,\n\tFree Ekanayaka <free.ekanayaka@gmail.com>,\n\tJan Kara <jack@suse.cz>,\n\tstable@vger.kernel.org", "Subject": "[PATCH 2/2] ext4: Fix fsync(2) for nojournal mode", "Date": "Mon, 16 Feb 2026 17:48:44 +0100", "Message-ID": "<20260216164848.3074-4-jack@suse.cz>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260211140209.30337-1-jack@suse.cz>", "References": "<20260211140209.30337-1-jack@suse.cz>", "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", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=1726; i=jack@suse.cz;\n h=from:subject; bh=dyj19ZhdVKL7uG64tncRok+1Kd5QGtnLKMX3tiEjlJ4=;\n b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBpk0pxRoVGS5mxBEC8M5uXJVA0s1krWTiN9KCb2\n YJ0qWNuClSJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCaZNKcQAKCRCcnaoHP2RA\n 2Rk0CACoX3ZjS3BgykyREh6EExIEAyXRISkj31B3IkDJhDsl38t14QyrMTdEttwLtJyQv9u8vmq\n qcHSGi8e79g9X6ZAImRyiOgM2hKPyM8CFlPLJJ4xCS+cS255mi8n0YKvGpJIuZZ7b36eQnEG+Qx\n ggMOBIGgBhwnDMu14ShTe/EY+qFV1UcC6EGbiz9RPgazxvkaFs0KiBkXO/09asddNpp0401l4Fh\n cAi1LbEjubCEajBGQfrIJT0vWiSMGDzYed+pIvyMBBMfOOmg5gWPTAN2jaVUfGTEaThs313D6FA\n SY0X7Nxifdc+ibShtPqt4wlsRRXDxZuujelh3IUwFd1ueQrw", "X-Developer-Key": "i=jack@suse.cz; a=openpgp;\n fpr=93C6099A142276A28BBE35D815BC833443038D8C", "Content-Transfer-Encoding": "8bit", "X-Rspamd-Pre-Result": [ "action=no action;\n\tmodule=replies;\n\tMessage is reply to one we originated", "action=no action;\n\tmodule=replies;\n\tMessage is reply to one we originated" ], "X-Spamd-Result": "default: False [-4.00 / 50.00];\n\tREPLY(-4.00)[];\n\tTAGGED_RCPT(0.00)[]", "X-Spam-Score": "-4.00", "X-Rspamd-Queue-Id": "14EA33E890", "X-Rspamd-Action": "no action", "X-Rspamd-Server": "rspamd2.dmz-prg2.suse.org", "X-Spam-Level": "", "X-Spam-Status": "No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "When inode metadata is changed, we sometimes just call\next4_mark_inode_dirty() to track modified metadata. This copies inode\nmetadata into block buffer which is enough when we are journalling\nmetadata. However when we are running in nojournal mode we currently\nfail to write the dirtied inode buffer during fsync(2) because the inode\nis not marked as dirty. Use explicit ext4_write_inode() call to make\nsure the inode table buffer is written to the disk. This is a band aid\nsolution but proper solution requires a much larger rewrite including\nchanges in metadata bh tracking infrastructure.\n\nReported-by: Free Ekanayaka <free.ekanayaka@gmail.com>\nLink: https://lore.kernel.org/all/87il8nhxdm.fsf@x1.mail-host-address-is-not-set/\nCC: stable@vger.kernel.org\nSigned-off-by: Jan Kara <jack@suse.cz>\n---\n fs/ext4/fsync.c | 16 ++++++++++++++--\n 1 file changed, 14 insertions(+), 2 deletions(-)", "diff": "diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c\nindex e476c6de3074..bd8f230fa507 100644\n--- a/fs/ext4/fsync.c\n+++ b/fs/ext4/fsync.c\n@@ -83,11 +83,23 @@ static int ext4_fsync_nojournal(struct file *file, loff_t start, loff_t end,\n \t\t\t\tint datasync, bool *needs_barrier)\n {\n \tstruct inode *inode = file->f_inode;\n+\tstruct writeback_control wbc = {\n+\t\t.sync_mode = WB_SYNC_ALL,\n+\t\t.nr_to_write = 0,\n+\t};\n \tint ret;\n \n \tret = generic_buffers_fsync_noflush(file, start, end, datasync);\n-\tif (!ret)\n-\t\tret = ext4_sync_parent(inode);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* Force writeout of inode table buffer to disk */\n+\tret = ext4_write_inode(inode, &wbc);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = ext4_sync_parent(inode);\n+\n \tif (test_opt(inode->i_sb, BARRIER))\n \t\t*needs_barrier = true;\n \n", "prefixes": [ "2/2" ] }