From: "Theodore Ts'o" <tytso@mit.edu>
To: Zhang Yi <yi.zhang@huawei.com>
Cc: Jan Kara <jack@suse.cz>,
linuxppc-dev@lists.ozlabs.org,
Guoqing Jiang <guoqing.jiang@linux.dev>,
Sachin Sant <sachinp@linux.vnet.ibm.com>,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests
Date: Fri, 2 Jul 2021 12:11:54 -0400 [thread overview]
Message-ID: <YN86yl5kgVaRixxQ@mit.edu> (raw)
In-Reply-To: <03f734bd-f36e-f55b-0448-485b8a0d5b75@huawei.com>
On Fri, Jul 02, 2021 at 09:52:13PM +0800, Zhang Yi wrote:
>
> Sorry about not catching this problem, this fix is not format corrected,
> if you think this fix is OK, I can send a patch after test.
The issue I see with your approach, which removes the
jbd2_journal_unregister_shrinker() call from jbd2_destsroy_journal(),
is that means that *all* callers of jbd2_destroy_journal now have to
be responsible for calling jbd2_journal_unregister_shrinker() --- and
there a number of call sites to jbd2_journal_unregister_shrinker():
fs/ext4/super.c: err = jbd2_journal_destroy(sbi->s_journal);
fs/ext4/super.c: jbd2_journal_destroy(sbi->s_journal);
fs/ext4/super.c: jbd2_journal_destroy(journal);
fs/ext4/super.c: jbd2_journal_destroy(journal);
fs/ext4/super.c: jbd2_journal_destroy(journal);
fs/ocfs2/journal.c: if (!jbd2_journal_destroy(journal->j_journal) && !status) {
fs/ocfs2/journal.c: jbd2_journal_destroy(journal);
fs/ocfs2/journal.c: jbd2_journal_destroy(journal);
So it probably makes more sense to keep jbd2_journal_unregister_shrinker()
in jbd2_destroy_journal(), since arguably the fact that we are using a
shrinker is an internal implementation detail, and the users of jbd2
ideally shouldn't need to be expected to know they have unregister
jbd2's shirnkers.
Similarly, perhaps we should be moving jbd2_journal_register_shirnker()
into jbd2_journal_init_common(). We can un-export the register and
unshrink register functions, and declare them as static functions internal
to fs/jbd2/journal.c.
What do you think?
- Ted
next prev parent reply other threads:[~2021-07-02 16:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 8:51 [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests Sachin Sant
2021-07-02 9:38 ` Guoqing Jiang
2021-07-02 13:13 ` Theodore Ts'o
2021-07-02 13:23 ` Zhang Yi
2021-07-02 13:52 ` Zhang Yi
2021-07-02 16:11 ` Theodore Ts'o [this message]
2021-07-02 22:11 ` Theodore Ts'o
2021-07-03 3:37 ` Zhang Yi
2021-07-03 3:52 ` Theodore Ts'o
2021-07-03 3:05 ` Zhang Yi
2021-07-03 3:35 ` Theodore Ts'o
2021-07-03 4:55 ` Zhang Yi
2021-07-04 14:04 ` Theodore Ts'o
2021-07-05 2:17 ` Zhang Yi
2021-07-05 9:58 ` Jan Kara
2021-07-05 11:27 ` Sachin Sant
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=YN86yl5kgVaRixxQ@mit.edu \
--to=tytso@mit.edu \
--cc=guoqing.jiang@linux.dev \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sachinp@linux.vnet.ibm.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).