Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3296699pxb; Fri, 12 Feb 2021 14:47:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGiBOMwoDSvctj+cYDGks50MH7DGiIpW2nzWi8+3gcaf5UZ7DFHikVFP01t2WqdV/qeP95 X-Received: by 2002:a17:906:c08a:: with SMTP id f10mr5202465ejz.52.1613170033290; Fri, 12 Feb 2021 14:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613170033; cv=none; d=google.com; s=arc-20160816; b=Qmfz/4IVZbwCTj4iScDr0CHVlqo2NntwDW0Ka2ZfJ2+vQQF49U/TU7g8RFG/0kXrE2 3g+fDtunRtVE5pcj+cOzDUI5E0LOg1z2M6Gmgw+XgDZi4aen1GDX4Mni0GJcP9n1gUpW lhWb5V8/t5qMnJoEN7isNFz7Lg5xShTWZE21uJENNpmz4MiNzlxGEd4KURasmHif5yiF 2OniYrVglReg2mg2eka/1kaPLm5GxuUHKcrkGPHKUzmcuhzTQiHDGkFvligZU5dNfM7P ZZYAC8oUNjqOsXwhnzmnu3IgKo5DPrsRc46KSzR4LYMRLQ6nstQlJF+00Oi0/Adj0e+s 86qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QcNFNrFbEBWBhSBFM0Vkguq1AuFyie7eyNXMcuoiCtA=; b=yqB2glYYc/0xsnteC6+r7eazV/LVChJVWGswHOH5Y+MMgxyCT8Krxa00SljsHVebUL E5zOUb6CCOJ4LveLu+5kMbgzfmXKVnqhqItCAhHC9FEUUe/qWc57KuqBlDZAHoyiUg71 q98n4X8qoR7cdxxXQDXlq0GdTuCXbWCuFXBR+7mG91a6eL7ch9uhKJqvb9qfugQmHPDd dJjtTsCIoZkEvaEP/AhvBUySGJ8dR/kwdJIyQ0IHYPaxKcxWXCNlDvw2huPJ4IlEPXhF EWpZKBoiDT+zuuuEjha9Fh9HbXZxa2pLJqhiKoqMW3Bg/GSfh1S/uXyKZtO1R6NzfwES 7Jsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bz6gNxSj; 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 u5si7288450ejz.642.2021.02.12.14.46.49; Fri, 12 Feb 2021 14:47:13 -0800 (PST) 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=bz6gNxSj; 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 S232389AbhBLWqR (ORCPT + 99 others); Fri, 12 Feb 2021 17:46:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:44844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232410AbhBLWeU (ORCPT ); Fri, 12 Feb 2021 17:34:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A406864DA1; Fri, 12 Feb 2021 22:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613169218; bh=zPLaLMvsfWolU7A16h5AwBVtaAqZZp8VsJK9aSEF+Oc=; h=From:To:Cc:Subject:Date:From; b=bz6gNxSjE+LWAL4HXxQHIymg3n3+zD6JqskLilyqGZ5jqrCqJZvHk9NWo0CNc7huw yKpW+I6iavEVqoSSgOO3TiJnXPmvDzNZC4MszJTW1VdhgewpuLure/rWoZMD1BSCA9 Xott4J6YPohZZYrMGQEKQ5mm3UL5MKefqqGxP/Xc4V44YkLR7xzEgq/u8zZeVTLA7G 5M4ApIfpA4FWYB4dXI+uQKsKUhTG6I4EGJ7QfT04sQbYUtlFCaMmWeLFALRgEqqbwm 6nGWGwp8O/FWZ7mK0Dm4b6x4rmjpUfcbR2OKdlVqHJAELOTQh49C9qBxgZEgn+56XC OTw1KVO6nD28g== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Cc: Jaegeuk Kim Subject: [PATCH] f2fs: give a warning only for readonly partition Date: Fri, 12 Feb 2021 14:33:34 -0800 Message-Id: <20210212223334.3550799-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's allow mounting readonly partition. We're able to recovery later once we have it as read-write back. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 4aa533cb4340..30d5abef4361 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3933,12 +3933,10 @@ 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)) { - err = -EROFS; + if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) f2fs_err(sbi, "Need to recover fsync data, but write access unavailable"); - goto free_meta; - } - f2fs_info(sbi, "write access unavailable, skipping recovery"); + else + f2fs_info(sbi, "write access unavailable, skipping recovery"); goto reset_checkpoint; } -- 2.30.0.478.g8a0d178c01-goog