Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4483330pxf; Tue, 23 Mar 2021 11:41:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbBXWzEcK0G8QGGbxn3zaUcDQ+XVJip0YULsoDHepuqQ6NWl6Ej95ylICDYGUY8JA7m2k2 X-Received: by 2002:a17:906:405b:: with SMTP id y27mr6410976ejj.332.1616524865496; Tue, 23 Mar 2021 11:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616524865; cv=none; d=google.com; s=arc-20160816; b=yrfGWbIrikaibE737IL4gFn/2jRxcUvOxtwtq6tDtAcR8e6UHHdQfDVE/F8MfnBEZd q9Ke4qPsjTvFnOo2QMACO/oJ6/BZtStX2quJeo5UGHTrLhHQLpgPE507Px5k7EzbmeDo I6ENBjhh7S6Xx8BlDZ/vtS/BBLfHISn2C/r94HHTeV+vIQzeNBItI3ksYi+W/CdhE3GD EinMEzmUrvcTMcoxi2MykYdOeCYWOTGIydD3rpEb+GUzJeQCfh8spJhWsV/bvhMh23pk x4zY18pQYd6CJ6Nn9FpPCDF0iObbZFgdD8vooAb+n68b8Z9+vRl40leFJFwheuoYgdwH 8nCQ== 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:dkim-signature; bh=Oo93yrYbholyPHnSCbhY2bAqDKMeiBa61G2tTjIchWk=; b=mFPAjaXIc3BKWBX9a1yccZZ7F2loTZQpgO+6PjfeUVF1ZOWei/TNL8ekic5jGrE+Nx iN3FLsANv/hLF2j1AxhtGRRwzuPKcR7YoWYtog/4eashdHRsArRsou4FMzgnGZXSODWJ 8TRp7cuqjdcIDEU4KhTsfFJdfMC9j0bsi29TfIThJVvdeUVd2+YpvTNWh51J9VWLZ3mt JSQIij7AevzxRCloNzezNB9Zm+nh6hzeZR30rO5/SKBm55MqB6y2p7b431jXv53MfsGS GoU+8CTToHLKUoN3zareH711UBiytTaku88QvwOwDA/XOchbJK+OVEjEFMu+qjHZ9C3W NxXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C+LdZ8jk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa4si14102286ejb.662.2021.03.23.11.40.40; Tue, 23 Mar 2021 11:41:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C+LdZ8jk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbhCWSjj (ORCPT + 99 others); Tue, 23 Mar 2021 14:39:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:50606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232103AbhCWSji (ORCPT ); Tue, 23 Mar 2021 14:39:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A1BC60200; Tue, 23 Mar 2021 18:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616524778; bh=0kSLNKQSz2QSG9wMkW2lNiXkYaK/wjl031Wzl1gMSKw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C+LdZ8jkgyoBNkl83dF6ABdg/ZAXCReS5ebQzZcimeguVxw6jp7cQTGb6c0Db7r99 GZJAEQ7YfS2KrOl4HkBLzCN1DE6vprvuDg9kVKBExKM0gZC+Y0Ijd8bEbBzCWtH5D+ EonLO53/BAJgRoayhuNDGua77kW4mqUYrp7AaZcIuc0qm9ZJcEQRBZm3+sIB42/aDn goZI52amaT7XobuN7JfHmxZPJEedh0Ya9OlUScXW3HXj4UQAE/+NOylE4izexRvI5U JtrUjQyjUjjLSxt2j/yVVes+xkcafqTIJ1ixW0cl+sZEks9yFsJV4j4vGIM8otrOaK V/u1ywkOeddKw== Date: Tue, 23 Mar 2021 11:39:36 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH] Revert "f2fs: give a warning only for readonly partition" Message-ID: References: <20210323064155.12582-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323064155.12582-1-yuchao0@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23, Chao Yu wrote: > This reverts commit 938a184265d75ea474f1c6fe1da96a5196163789. > > Because that commit fails generic/050 testcase which expect failure > during mount a recoverable readonly partition. I think we need to change generic/050, since f2fs can recover this partition, even though using it as readonly. And, valid checkpoint can allow for user to read all the data without problem. > > Fixes: 938a184265d7 ("f2fs: give a warning only for readonly partition") > Signed-off-by: Chao Yu > --- > fs/f2fs/super.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index b48281642e98..2b78ee11f093 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -3952,10 +3952,12 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) > * previous checkpoint was not done by clean system shutdown. > */ > if (f2fs_hw_is_readonly(sbi)) { > - if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) > + if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) { > + err = -EROFS; > f2fs_err(sbi, "Need to recover fsync data, but write access unavailable"); > - else > - f2fs_info(sbi, "write access unavailable, skipping recovery"); > + goto free_meta; > + } > + f2fs_info(sbi, "write access unavailable, skipping recovery"); > goto reset_checkpoint; > } > > -- > 2.29.2