From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CC38C11F6B for ; Fri, 2 Jul 2021 13:13:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 557AD61424 for ; Fri, 2 Jul 2021 13:13:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232502AbhGBNQV (ORCPT ); Fri, 2 Jul 2021 09:16:21 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:40717 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231743AbhGBNQU (ORCPT ); Fri, 2 Jul 2021 09:16:20 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 162DDKDI002165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 2 Jul 2021 09:13:21 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id AE97615C3CE4; Fri, 2 Jul 2021 09:13:20 -0400 (EDT) Date: Fri, 2 Jul 2021 09:13:20 -0400 From: "Theodore Ts'o" To: Guoqing Jiang Cc: Sachin Sant , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, yi.zhang@huawei.com, jack@suse.cz Subject: Re: [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests Message-ID: References: <26ACA75D-E13D-405B-9BFC-691B5FB64243@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Jul 02, 2021 at 05:38:10PM +0800, Guoqing Jiang wrote: > > > I guess the problem is j_jh_shrink_count was destroyed in ext4_put_super _>  > jbd2_journal_unregister_shrinker > which is before the path ext4_put_super -> jbd2_journal_destroy -> > jbd2_log_do_checkpoint to call > percpu_counter_dec(&journal->j_jh_shrink_count). > > And since jbd2_journal_unregister_shrinker is already called inside > jbd2_journal_destroy, does it make sense > to do this? > > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1176,7 +1176,6 @@ static void ext4_put_super(struct super_block *sb) >         ext4_unregister_sysfs(sb); > >         if (sbi->s_journal) { > -               jbd2_journal_unregister_shrinker(sbi->s_journal); >                 aborted = is_journal_aborted(sbi->s_journal); >                 err = jbd2_journal_destroy(sbi->s_journal); >                 sbi->s_journal = NULL; Good catch. There's another place where we call jbd2_journal_unregister_shrinker(), in the failure path for ext4_fill_super(). - Ted P.S. Whatever outgoing mailer you are using, it's not preserving TAB characters correctly. You might want to look into that before trying to submit a patch. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C152DC11F68 for ; Fri, 2 Jul 2021 13:16:29 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B44E56141D for ; Fri, 2 Jul 2021 13:16:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B44E56141D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GGbFQ6LyDz3bjp for ; Fri, 2 Jul 2021 23:16:26 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=mit.edu (client-ip=18.9.28.11; helo=outgoing.mit.edu; envelope-from=tytso@mit.edu; receiver=) X-Greylist: delayed 141 seconds by postgrey-1.36 at boromir; Fri, 02 Jul 2021 23:16:03 AEST Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GGbDz1JMCz301N for ; Fri, 2 Jul 2021 23:16:01 +1000 (AEST) Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 162DDKDI002165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 2 Jul 2021 09:13:21 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id AE97615C3CE4; Fri, 2 Jul 2021 09:13:20 -0400 (EDT) Date: Fri, 2 Jul 2021 09:13:20 -0400 From: "Theodore Ts'o" To: Guoqing Jiang Subject: Re: [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests Message-ID: References: <26ACA75D-E13D-405B-9BFC-691B5FB64243@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sachin Sant , jack@suse.cz, yi.zhang@huawei.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Jul 02, 2021 at 05:38:10PM +0800, Guoqing Jiang wrote: > > > I guess the problem is j_jh_shrink_count was destroyed in ext4_put_super _>  > jbd2_journal_unregister_shrinker > which is before the path ext4_put_super -> jbd2_journal_destroy -> > jbd2_log_do_checkpoint to call > percpu_counter_dec(&journal->j_jh_shrink_count). > > And since jbd2_journal_unregister_shrinker is already called inside > jbd2_journal_destroy, does it make sense > to do this? > > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1176,7 +1176,6 @@ static void ext4_put_super(struct super_block *sb) >         ext4_unregister_sysfs(sb); > >         if (sbi->s_journal) { > -               jbd2_journal_unregister_shrinker(sbi->s_journal); >                 aborted = is_journal_aborted(sbi->s_journal); >                 err = jbd2_journal_destroy(sbi->s_journal); >                 sbi->s_journal = NULL; Good catch. There's another place where we call jbd2_journal_unregister_shrinker(), in the failure path for ext4_fill_super(). - Ted P.S. Whatever outgoing mailer you are using, it's not preserving TAB characters correctly. You might want to look into that before trying to submit a patch.