Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226015/?format=api
{ "id": 2226015, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226015/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260422021042.4157510-18-yi.zhang@huaweicloud.com/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260422021042.4157510-18-yi.zhang@huaweicloud.com>", "list_archive_url": null, "date": "2026-04-22T02:10:37", "name": "[v3,17/22] ext4: partially enable iomap for the buffered I/O path of regular files", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "cbb29a043a9a223833576db382322d2d1f58e618", "submitter": { "id": 85428, "url": "http://patchwork.ozlabs.org/api/1.2/people/85428/?format=api", "name": "Zhang Yi", "email": "yi.zhang@huaweicloud.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260422021042.4157510-18-yi.zhang@huaweicloud.com/mbox/", "series": [ { "id": 500911, "url": "http://patchwork.ozlabs.org/api/1.2/series/500911/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=500911", "date": "2026-04-22T02:10:23", "name": "ext4: use iomap for regular file's buffered I/O path", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/500911/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226015/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226015/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=dWpv=CV=vger.kernel.org=linux-ext4+bounces-15982-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=dwpv=cv=vger.kernel.org=linux-ext4+bounces-15982-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.105.105.114 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15982-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=45.249.212.56", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huaweicloud.com" ], "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 4g0jfN2D2Lz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 12:22:04 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g0jfN1mCvz4w1l\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 12:22:04 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4g0jfN1hTDz4wK3; Wed, 22 Apr 2026 12:22:04 +1000 (AEST)", "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4g0jfJ5DKjz4w1l\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 22 Apr 2026 12:22:00 +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 9A9A8308FFC9\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 22 Apr 2026 02:18:04 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 6D72C31E856;\n\tWed, 22 Apr 2026 02:17:08 +0000 (UTC)", "from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com\n [45.249.212.56])\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 64BEB3537F8;\n\tWed, 22 Apr 2026 02:17:04 +0000 (UTC)", "from mail.maildlp.com (unknown [172.19.163.177])\n\tby dggsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4g0jX51kRXzKHMTT;\n\tWed, 22 Apr 2026 10:16:37 +0800 (CST)", "from mail02.huawei.com (unknown [10.116.40.252])\n\tby mail.maildlp.com (Postfix) with ESMTP id 457E0405F8;\n\tWed, 22 Apr 2026 10:16:57 +0800 (CST)", "from huaweicloud.com (unknown [10.50.85.155])\n\tby APP3 (Coremail) with SMTP id _Ch0CgB3JL6PL+hpqkgUBQ--.2635S21;\n\tWed, 22 Apr 2026 10:16:56 +0800 (CST)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776824524; cv=pass;\n\tb=rkcNt5BHWwZo//lr91ILLSweIlcgB3TfVBbs0+DuVMozw8+YO7466ZA9e3Sqy4yUsl1HX/OaNStZwB0dXvxW8CLyLhuCZr3PonKOcIFhrqhJ43wZwMbnKJfHarvbjgtIzDrTMAHvMnnxg8JNYhgdXNXLi2CZW+URVgjRyXXZluuO0HxHEPzBR8PXxv6qVgckuEe9rL/c2f8InrEy7UolhlYN+63F/HV8tYK95jEfX943QwsWYg+4yn28Wums9tAUEfGO9N1+xq6tbAlMgiLkN44pSYA45aVs7YZ6we3M0FuvZ079hNmUYoacE3LBkIP9+tyRI2kueiawdAR2gZcoRw==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776824228; cv=none;\n b=JyGv0owC3Mx6Al77cKdTch6Iz3XSwC3qdt/fWubJfQxcygy+kSxu+3seeB4BzIZFvkpZv5kb7nWbwewhT5AG1TzmL1sGT0SI3rBa5A395eBSNk4GiIf5FbLKLuF+T0Oj6TdbcThERaRKfHw5Jj4pITveSyHzxlAPMrwD+VORkss=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776824524; c=relaxed/relaxed;\n\tbh=4aS0ozDspjAqE5wDbzqizUGjRQkdSs1Pajjb8UzoRis=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=tXJ783QESUDjolNiJkZx0Mi4xibYJvDp914FbWRN46poKTHehOf43mUOKRt9DlaYP9kaM3thhE0U73iTLcUYP6wEIK6mhsfXlcJ111ywxm7YjDdkLyNAb8EK1P0QBZfUTb1XH5QN4gU999pzpQq7is1NSLj1aQHe//JX9fEeF2ju+H0L8FCP1aG4gRi/p5b5/68pRt7hgCcVMHJGR4shRNhKUpRHfs7mSu0zJTBSqHIWv6OT6iyaW3n86t3lhdRJJx8h8Tnb0CuQRUExYIm5NosNbfrTQom6p+9gwddU0wuI6Vheszw3fvTfsFq/nzoPQEGcPbUJNv4quUniZlomWw==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776824228; c=relaxed/simple;\n\tbh=EvEDJ4oSgF5i0Y+bxfo/CO9bC+0K95e4uWWm3+SznEo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=VJt6A/MYX40Ezwp4kR7Bke7aPGh6JEyMaxRAWUUK2Z1drZ/A4MqUkkWfZ6LJUa3Sw8GG3IMUa9J5lm21ZYMtzqOJZCuiReMAO8EMi4nrseuY5mHzC/knD9IHMMIuORD7pFgVlXva8KQtw6E9zRX8FC1a57uaVrTU3oOUAhPqZ2s=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15982-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=huaweicloud.com;\n spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56" ], "From": "Zhang Yi <yi.zhang@huaweicloud.com>", "To": "linux-ext4@vger.kernel.org,\n\tlinux-fsdevel@vger.kernel.org", "Cc": "linux-kernel@vger.kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tlibaokun@linux.alibaba.com,\n\tjack@suse.cz,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tdjwong@kernel.org,\n\thch@infradead.org,\n\tyi.zhang@huawei.com,\n\tyi.zhang@huaweicloud.com,\n\tyizhang089@gmail.com,\n\tyangerkun@huawei.com,\n\tyukuai@fnnas.com", "Subject": "[PATCH v3 17/22] ext4: partially enable iomap for the buffered I/O\n path of regular files", "Date": "Wed, 22 Apr 2026 10:10:37 +0800", "Message-ID": "<20260422021042.4157510-18-yi.zhang@huaweicloud.com>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260422021042.4157510-1-yi.zhang@huaweicloud.com>", "References": "<20260422021042.4157510-1-yi.zhang@huaweicloud.com>", "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-Transfer-Encoding": "8bit", "X-CM-TRANSID": "_Ch0CgB3JL6PL+hpqkgUBQ--.2635S21", "X-Coremail-Antispam": "1UD129KBjvJXoWxCrW8CFykuryrJr1kAryUtrb_yoWrurWkpr\n\t9xKryrGr4DX3s29w4ftr4UZr1Yv3WxG3yUGrWfurs8ZrWDJw1IqFyUtF1YyF15JrWrWw4Y\n\tqF40kr1UursxCrDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUmS14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI\n\tkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2\n\tz4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F\n\t4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq\n\t3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7\n\tIYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U\n\tM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2\n\tkIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE\n\tbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67\n\tAF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW8JVW5JwCI\n\t42IY6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF\n\t4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBI\n\tdaVFxhVjvjDU0xZFpf9x0JUWMKtUUUUU=", "X-CM-SenderInfo": "d1lo6xhdqjqx5xdzvxpfor3voofrz/", "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": "From: Zhang Yi <yi.zhang@huawei.com>\n\nPartially enable iomap for the buffered I/O path of regular files. We\nnow support default filesystem features, mount options, and the bigalloc\nfeature. However, inline data, fsverity, fscrypt, online\ndefragmentation, and data=journal mode are not yet supported. Some of\nthese features are expected to be gradually supported in the future. The\nfilesystem will automatically fall back to the original buffer_head path\nif these mount options or features are enabled.\n\nSigned-off-by: Zhang Yi <yi.zhang@huawei.com>\n---\n fs/ext4/ext4.h | 1 +\n fs/ext4/ext4_jbd2.c | 1 +\n fs/ext4/ialloc.c | 1 +\n fs/ext4/inode.c | 36 ++++++++++++++++++++++++++++++++++++\n 4 files changed, 39 insertions(+)", "diff": "diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h\nindex 0ffa81f86bc5..80d086d40990 100644\n--- a/fs/ext4/ext4.h\n+++ b/fs/ext4/ext4.h\n@@ -3059,6 +3059,7 @@ int ext4_walk_page_buffers(handle_t *handle,\n int do_journal_get_write_access(handle_t *handle, struct inode *inode,\n \t\t\t\tstruct buffer_head *bh);\n void ext4_set_inode_mapping_order(struct inode *inode);\n+void ext4_enable_buffered_iomap(struct inode *inode);\n int ext4_nonda_switch(struct super_block *sb);\n #define FALL_BACK_TO_NONDELALLOC 1\n #define CONVERT_INLINE_DATA\t 2\ndiff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c\nindex 9a8c225f2753..9b25a1c414b9 100644\n--- a/fs/ext4/ext4_jbd2.c\n+++ b/fs/ext4/ext4_jbd2.c\n@@ -16,6 +16,7 @@ int ext4_inode_journal_mode(struct inode *inode)\n \t ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE) ||\n \t test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ||\n \t (ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA) &&\n+\t !ext4_inode_buffered_iomap(inode) &&\n \t !test_opt(inode->i_sb, DELALLOC))) {\n \t\t/* We do not support data journalling for encrypted data */\n \t\tif (S_ISREG(inode->i_mode) && IS_ENCRYPTED(inode))\ndiff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c\nindex 3fd8f0099852..ea64b9e9e382 100644\n--- a/fs/ext4/ialloc.c\n+++ b/fs/ext4/ialloc.c\n@@ -1340,6 +1340,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \t\t}\n \t}\n \n+\text4_enable_buffered_iomap(inode);\n \text4_set_inode_mapping_order(inode);\n \n \text4_update_inode_fsync_trans(handle, inode, 1);\ndiff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 53fdcb50f3dd..57b5708235cf 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -918,6 +918,9 @@ static int _ext4_get_block(struct inode *inode, sector_t iblock,\n \n \tif (ext4_has_inline_data(inode))\n \t\treturn -ERANGE;\n+\t/* inodes using the iomap buffered I/O path should not go here. */\n+\tif (WARN_ON_ONCE(ext4_inode_buffered_iomap(inode)))\n+\t\treturn -EINVAL;\n \n \tmap.m_lblk = iblock;\n \tmap.m_len = bh->b_size >> inode->i_blkbits;\n@@ -2797,6 +2800,12 @@ static int ext4_do_writepages(struct mpage_da_data *mpd)\n \tif (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))\n \t\tgoto out_writepages;\n \n+\t/* inodes using the iomap buffered I/O path should not go here. */\n+\tif (WARN_ON_ONCE(ext4_inode_buffered_iomap(inode))) {\n+\t\tret = -EINVAL;\n+\t\tgoto out_writepages;\n+\t}\n+\n \t/*\n \t * If the filesystem has aborted, it is read-only, so return\n \t * right away instead of dumping stack traces later on that\n@@ -5737,6 +5746,31 @@ static int check_igot_inode(struct inode *inode, ext4_iget_flags flags,\n \treturn -EFSCORRUPTED;\n }\n \n+void ext4_enable_buffered_iomap(struct inode *inode)\n+{\n+\tstruct super_block *sb = inode->i_sb;\n+\n+\tif (!S_ISREG(inode->i_mode))\n+\t\treturn;\n+\tif (ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE))\n+\t\treturn;\n+\n+\t/* Unsupported Features */\n+\tif (ext4_has_feature_inline_data(sb))\n+\t\treturn;\n+\tif (ext4_has_feature_verity(sb))\n+\t\treturn;\n+\tif (ext4_has_feature_encrypt(sb))\n+\t\treturn;\n+\tif (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ||\n+\t ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA))\n+\t\treturn;\n+\tif (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))\n+\t\treturn;\n+\n+\text4_set_inode_state(inode, EXT4_STATE_BUFFERED_IOMAP);\n+}\n+\n void ext4_set_inode_mapping_order(struct inode *inode)\n {\n \tstruct super_block *sb = inode->i_sb;\n@@ -6022,6 +6056,8 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,\n \tif (ret)\n \t\tgoto bad_inode;\n \n+\text4_enable_buffered_iomap(inode);\n+\n \tif (S_ISREG(inode->i_mode)) {\n \t\tinode->i_op = &ext4_file_inode_operations;\n \t\tinode->i_fop = &ext4_file_operations;\n", "prefixes": [ "v3", "17/22" ] }