Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1818845pxk; Fri, 2 Oct 2020 22:10:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3CrepusC116Ky0vfo7vIvIhehubX466j2KxbT6Jm1D8sSuQNuwjxz9E3ggI4QsMKBvsm9 X-Received: by 2002:a50:cbc9:: with SMTP id l9mr6248152edi.310.1601701813290; Fri, 02 Oct 2020 22:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601701813; cv=none; d=google.com; s=arc-20160816; b=U43R8aBWcNVTqEPOGpdUnuOvGDo31+PdZ1aIgAwTcDiGKPlWvo1NqgVqf8RASXmXdF gYalMQC3zR8lSHnzgGXTHU5qcdk/WuBmCH6WxD75WpfXImNTVxMjTOXzpd/BPbHzevlg KDYelGX4I0ctynRaLzq3v5ccXU3sEQvEpr5poNGfx4XyTF0m4jSXcTvIDKbXscQpCv/u M2ZDW2ycYuW+c+9aKDMTl+KMUATNITS02Bh//c8n1VvT2+LsALv8UrUycydRviP+WFme 8jckTLpNMZtzBn9A+Bdg6TVjCr8+9UyRxaethx0c4TSF17TZ11OjBuJVlzie9SkilpbV UWUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/mfqQf+JKG2J7A9EEtIHLMR/5Nw26OfR9xtRnbxFXfA=; b=VtgSv/+wT718rKYprreUyH6yxBnG4/JzIj56XuEvXNjyychO8SwDk9uGjxq6BIycFb cRKmGrnaTeL4YD+Mzlt8w/MV+o1wOZ+y+C5/iyUHhhM9zXZVBx02OEQ8Q3nuTrAd1A7r 9LzFd/ylVE9NGk7AglbZJETCbWCK2bF6FPasoxoCjvLsX8OlNSKuittOTsV1gVK86Jqs VCgGt916fI1OK4M5xv4JfJjGvFD3AYxxIjlQdJwnoEgEJOJy+66p82qer5Im/1ZbP8I/ Nmxm8VJuE/TneO1R9VszXLeF6Wip++CBzDQIbgkNDLkBs6ht0clIvhkfffNjFf82Uvcp wKzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si2601467edi.411.2020.10.02.22.09.49; Fri, 02 Oct 2020 22:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725681AbgJCFJq (ORCPT + 99 others); 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