From: Yun Zhou <yun.zhou@windriver.com>
To: <tytso@mit.edu>, <adilger.kernel@dilger.ca>,
<libaokun@linux.alibaba.com>, <jack@suse.cz>,
<ojaswin@linux.ibm.com>, <ritesh.list@gmail.com>,
<yi.zhang@huawei.com>
Cc: <linux-ext4@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yun.zhou@windriver.com>
Subject: [RFC PATCH 2/9] ext4: stop creating inline data for new regular files
Date: Mon, 27 Jul 2026 18:54:34 +0800 [thread overview]
Message-ID: <20260727105441.3213095-3-yun.zhou@windriver.com> (raw)
In-Reply-To: <20260727105441.3213095-1-yun.zhou@windriver.com>
Stop setting EXT4_STATE_MAY_INLINE_DATA for newly allocated regular
file inodes. New files always use block-based storage. Directories
retain inline data capability as it still provides value for small
directories without the write path complexity.
Existing file inodes with inline data are not affected -- MAY_INLINE_DATA
is still set for them during iget via ext4_find_inline_data_nolock().
Signed-off-by: Yun Zhou <yun.zhou@windriver.com>
---
fs/ext4/ialloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index a40cb27f8116..278f0ab8c996 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1305,8 +1305,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
ei->i_extra_isize = sbi->s_want_extra_isize;
ei->i_inline_off = 0;
- if (ext4_has_feature_inline_data(sb) &&
- (!(ei->i_flags & (EXT4_DAX_FL|EXT4_EA_INODE_FL)) || S_ISDIR(mode)))
+ if (ext4_has_feature_inline_data(sb) && S_ISDIR(mode) &&
+ !(ei->i_flags & EXT4_DAX_FL))
ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);
ret = inode;
err = dquot_alloc_inode(inode);
--
2.43.0
next prev parent reply other threads:[~2026-07-27 11:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 10:54 [RFC PATCH 0/9] ext4: phase out inline data write paths for regular files Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 1/9] ext4: add deprecation warning for inline_data feature Yun Zhou
2026-07-27 10:54 ` Yun Zhou [this message]
2026-07-27 10:54 ` [RFC PATCH 3/9] ext4: use safe convert path for inline data write overflow Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 4/9] ext4: remove inline data write paths for regular files Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 5/9] ext4: remove dead inline data write code Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 6/9] ext4: allocate block before destroying inline data in conversion Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 7/9] ext4: remove DA convert path for regular file inline data Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 8/9] ext4: document inline_data deprecation Yun Zhou
2026-07-27 10:54 ` [RFC PATCH 9/9] ext4: populate extent entry atomically during inline data destroy Yun Zhou
2026-07-27 15:03 ` [RFC PATCH 0/9] ext4: phase out inline data write paths for regular files Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260727105441.3213095-3-yun.zhou@windriver.com \
--to=yun.zhou@windriver.com \
--cc=adilger.kernel@dilger.ca \
--cc=jack@suse.cz \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox