public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Theodore Ts'o <tytso@mit.edu>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: Jan Kara <jack@suse.cz>, Zhang Yi <yi.zhang@huawei.com>,
	Sachin Sant <sachinp@linux.vnet.ibm.com>,
	linux-tegra <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH -v2] ext4: inline jbd2_journal_[un]register_shrinker()
Date: Mon, 5 Jul 2021 19:29:18 +0100	[thread overview]
Message-ID: <ecd3fa6b-7b49-74b8-cdfa-a1f00d92ec51@nvidia.com> (raw)
In-Reply-To: <20210705145025.3363130-1-tytso@mit.edu>


On 05/07/2021 15:50, Theodore Ts'o wrote:
> The function jbd2_journal_unregister_shrinker() was getting called
> twice when the file system was getting unmounted.  On Power and ARM
> platforms this was causing kernel crash when unmounting the file
> system, when a percpu_counter was destroyed twice.
> 
> Fix this by removing jbd2_journal_[un]register_shrinker() functions,
> and inlining the shrinker setup and teardown into
> journal_init_common() and jbd2_journal_destroy().  This means that
> ext4 and ocfs2 now no longer need to know about registering and
> unregistering jbd2's shrinker.
> 
> Also, while we're at it, rename the percpu counter from
> j_jh_shrink_count to j_checkpoint_jh_count, since this makes it
> clearer what this counter is intended to track.
> 
> Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers")
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Reported-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
> Tested-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Thanks, works for me.

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2021-07-05 18:29 UTC|newest]

Thread overview: 19+ 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
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 14:50                   ` [PATCH -v2] ext4: inline jbd2_journal_[un]register_shrinker() Theodore Ts'o
2021-07-05 18:29                     ` Jon Hunter [this message]
2021-07-06  1:38                     ` Zhang Yi
2021-07-05  9:58                 ` [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests 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=ecd3fa6b-7b49-74b8-cdfa-a1f00d92ec51@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=sachinp@linux.vnet.ibm.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