[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <42CECCCE-A338-408A-B392-F4E25E629D2A@linux.vnet.ibm.com>
Date: Mon, 5 Jul 2021 16:57:26 +0530
From: Sachin Sant <sachinp@...ux.vnet.ibm.com>
To: "Theodore Ts'o" <tytso@....edu>
Cc: Zhang Yi <yi.zhang@...wei.com>, Jan Kara <jack@...e.cz>,
linuxppc-dev@...ts.ozlabs.org,
Guoqing Jiang <guoqing.jiang@...ux.dev>,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [powerpc][5.13.0-next-20210701] Kernel crash while running
ltp(chdir01) tests
> On 04-Jul-2021, at 7:34 PM, Theodore Ts'o <tytso@....edu> wrote:
>
> On Sat, Jul 03, 2021 at 12:55:09PM +0800, Zhang Yi wrote:
>> Yeah, it sounds good to me. Do you want me to send the fix patch, or you
>> modify your commit 8f9e16badb8fd in another email directly?
>
> I've gone ahead and made the changes; what do you think?
>
> I like how it also removes 40 lines of code. :-)
>
> - Ted
>
> From ef3130d1b0b8ca769252d6a722a2e59a00141383 Mon Sep 17 00:00:00 2001
> From: Theodore Ts'o <tytso@....edu>
> Date: Fri, 2 Jul 2021 18:05:03 -0400
> Subject: [PATCH] ext4: inline jbd2_journal_[un]register_shrinker()
>
> 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: Sachin Sant <sachinp@...ux.vnet.ibm.com>
> Reported-by: Jon Hunter <jonathanh@...dia.com>
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> ---
This patch fixes the reported problem. Test ran to completion
without any crash.
Tested-by: Sachin Sant <sachinp@...ux.vnet.ibm.com>
-Sachin
Powered by blists - more mailing lists