linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao@huaweicloud.com>
To: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-ext4@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Ted Tso <tytso@mit.edu>, Jan Kara <jack@suse.cz>,
	Christoph Hellwig <hch@infradead.org>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Richard Weinberger <richard@nod.at>,
	"zhangyi (F)" <yi.zhang@huawei.com>,
	yangerkun <yangerkun@huawei.com>,
	"wangzhaolong (A)" <wangzhaolong1@huawei.com>,
	mjguzik@gmail.com,
	"rydercoding@hotmail.com >> Ryder Wang" <rydercoding@hotmail.com>
Subject: Re: [BUG REPORT] potential deadlock in inode evicting under the inode lru traversing context on ext4 and ubifs
Date: Mon, 5 Aug 2024 09:29:14 +0800	[thread overview]
Message-ID: <e67d289d-fd5e-cb38-4e2f-a2bbb8419a97@huaweicloud.com> (raw)
In-Reply-To: <37c29c42-7685-d1f0-067d-63582ffac405@huaweicloud.com>

Hi, based on the ideas from Jan and Mateusz, I sent a fix patch, see 
https://lore.kernel.org/linux-fsdevel/20240805013446.814357-1-chengzhihao@huaweicloud.com/T/#u

在 2024/7/12 14:27, Zhihao Cheng 写道:
> Hi. Recently, we found a deadlock in inode recliaiming process caused by 
> circular dependence between file inode and file's xattr inode.
> 
> Problem description
> ===================
> 
> The inode reclaiming process(See function prune_icache_sb) collects all 
> reclaimable inodes and mark them with I_FREEING flag at first, at that 
> time, other processes will be stuck if they try getting these inodes(See 
> function find_inode_fast), then the reclaiming process destroy the 
> inodes by function dispose_list().
> Some filesystems(eg. ext4 with ea_inode feature, ubifs with xattr) may 
> do inode lookup in the inode evicting callback function, if the inode 
> lookup is operated under the inode lru traversing context, deadlock 
> problems may happen.
> 


      parent reply	other threads:[~2024-08-05  1:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  6:27 [BUG REPORT] potential deadlock in inode evicting under the inode lru traversing context on ext4 and ubifs Zhihao Cheng
2024-07-12 14:37 ` Theodore Ts'o
2024-07-13  2:29   ` Zhihao Cheng
2024-07-18  3:04   ` Ryder Wang
2024-07-18  7:30     ` Zhihao Cheng
2024-07-18 13:40   ` Jan Kara
2024-07-19  3:21     ` Zhihao Cheng
2024-07-20 10:42       ` Mateusz Guzik
2024-08-05  1:29 ` Zhihao Cheng [this message]

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=e67d289d-fd5e-cb38-4e2f-a2bbb8419a97@huaweicloud.com \
    --to=chengzhihao@huaweicloud.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mjguzik@gmail.com \
    --cc=richard@nod.at \
    --cc=rydercoding@hotmail.com \
    --cc=tytso@mit.edu \
    --cc=wangzhaolong1@huawei.com \
    --cc=yangerkun@huawei.com \
    --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;
as well as URLs for NNTP newsgroup(s).