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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 33248C4363D for ; Sat, 3 Oct 2020 05:09:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC01D20679 for ; Sat, 3 Oct 2020 05:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725765AbgJCFJq (ORCPT ); Sat, 3 Oct 2020 01:09:46 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:56264 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725446AbgJCFJq (ORCPT ); Sat, 3 Oct 2020 01:09:46 -0400 Received: from callcc.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 09359UHk024769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 3 Oct 2020 01:09:30 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id D68E542003C; Sat, 3 Oct 2020 01:09:29 -0400 (EDT) Date: Sat, 3 Oct 2020 01:09:29 -0400 From: "Theodore Y. Ts'o" To: Zhang Xiaoxu Cc: yi.zhang@huawei.com, jack@suse.cz, linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca Subject: Re: [PATCH v3] ext4: Fix bdev write error check failed when mount fs with ro Message-ID: <20201003050929.GL23474@mit.edu> References: <20200928020556.710971-1-zhangxiaoxu5@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200928020556.710971-1-zhangxiaoxu5@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun, Sep 27, 2020 at 10:05:56PM -0400, Zhang Xiaoxu wrote: > Consider a situation when a filesystem was uncleanly shutdown and the > orphan list is not empty and a read-only mount is attempted. The orphan > list cleanup during mount will fail with: > > ext4_check_bdev_write_error:193: comm mount: Error while async write back metadata > > This happens because sbi->s_bdev_wb_err is not initialized when mounting > the filesystem in read only mode and so ext4_check_bdev_write_error() > falsely triggers. > > Initialize sbi->s_bdev_wb_err unconditionally to avoid this problem. > > Fixes: bc71726c7257 ("ext4: abort the filesystem if failed to async write metadata buffer") > Signed-off-by: Zhang Xiaoxu > Reviewed-by: Jan Kara Applied, thanks. - Ted