From: "Zhou, Yun" <yun.zhou@windriver.com>
To: Jan Kara <jack@suse.cz>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
libaokun@linux.alibaba.com, ojaswin@linux.ibm.com,
ritesh.list@gmail.com, yi.zhang@huawei.com,
viro@zeniv.linux.org.uk, brauner@kernel.org,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v10 2/5] ext4: introduce ext4_put_ea_inode() for safe deferred iput
Date: Mon, 29 Jun 2026 18:05:21 +0800 [thread overview]
Message-ID: <5f2f758e-3ada-432d-b391-129f5ac39528@windriver.com> (raw)
In-Reply-To: <hxkq54njehj4sin7ymm7kbpqy2hs2x7w7evi6qurxsyjsa3xvx@pzindvdeaii5>
On 6/29/26 16:23, Jan Kara wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Sun 28-06-26 16:13:18, Zhou, Yun wrote:
>>
>>
>> On 6/27/26 00:53, Jan Kara wrote:
>>> On Thu 25-06-26 23:29:38, Yun Zhou wrote:
>>>> +
>>>> +/*
>>>> + * Drain all pending deferred EA inode iputs. Must be called before
>>>> + * freeing resources that eviction depends on (quota, block allocator).
>>>> + * Loops because worker iput may trigger eviction that re-queues.
>>>> + */
>>>
>>> Can you please explain how iput of EA inode can trigger iput of another EA
>>> inode? So far I don't think that's possible but perhaps I'm missing
>>> something.
>>>
>>>> +static inline void ext4_drain_ea_inode_work(struct ext4_sb_info *sbi)
>>>> +{
>>>> + while (flush_delayed_work(&sbi->s_ea_inode_work) ||
>>>> + !llist_empty(&sbi->s_ea_inode_to_free))
>>>> + ;
>>>> +}
>>>>
>>
>> On a corrupted fs, an evicted ea_inode might still have xattrs and point to
>> another ea inode, which creates a potential "re-arm" scenario.
>
> That should be caught when loading such EA inode into memory and result in
> EFSCORRUPTED at that point. So please add such check to __ext4_iget().
>
My apologies, I overlooked this. There is actually already a relevant
check in check_igot_inode(). So, the Sashiko AI report is sometimes
inaccurate.
if (flags & EXT4_IGET_EA_INODE) {
if (!(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL)) {
err_str = "missing EA_INODE flag";
goto error;
}
if (ext4_test_inode_state(inode, EXT4_STATE_XATTR) ||
EXT4_I(inode)->i_file_acl) {
err_str = "ea_inode with extended attributes";
goto error;
}
next prev parent reply other threads:[~2026-06-29 10:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 15:29 [PATCH v10 0/5] ext4: deferred iput framework for EA inodes Yun Zhou
2026-06-25 15:29 ` [PATCH v10 1/5] fs: add iput_if_not_last() helper Yun Zhou
2026-06-26 16:30 ` Jan Kara
2026-06-25 15:29 ` [PATCH v10 2/5] ext4: introduce ext4_put_ea_inode() for safe deferred iput Yun Zhou
2026-06-26 16:53 ` Jan Kara
2026-06-28 8:13 ` Zhou, Yun
2026-06-29 8:23 ` Jan Kara
2026-06-29 10:05 ` Zhou, Yun [this message]
2026-06-25 15:29 ` [PATCH v10 3/5] ext4: convert all EA inode iput() calls to ext4_put_ea_inode() Yun Zhou
2026-06-25 15:29 ` [PATCH v10 4/5] ext4: remove ea_inode_array mechanism in favor of ext4_put_ea_inode() Yun Zhou
2026-06-25 15:29 ` [PATCH v10 5/5] ext4: prevent deadlock from duplicate EA inode references on corrupted fs Yun Zhou
2026-06-26 17:23 ` Jan Kara
2026-06-28 8:35 ` Zhou, Yun
2026-06-29 8:27 ` Jan Kara
2026-06-28 18:57 ` XIAO WU
2026-06-29 3:17 ` Zhou, Yun
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=5f2f758e-3ada-432d-b391-129f5ac39528@windriver.com \
--to=yun.zhou@windriver.com \
--cc=adilger.kernel@dilger.ca \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--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