Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3515042pxv; Mon, 19 Jul 2021 02:01:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjdCnkQ9hCb+3gCYK5CY2zd9VIAyv+cta33AU/MXuaY2RJObH6aTMXCPJyAQqS0GQ0c2XA X-Received: by 2002:a6b:fe06:: with SMTP id x6mr18030527ioh.38.1626685281888; Mon, 19 Jul 2021 02:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626685281; cv=none; d=google.com; s=arc-20160816; b=lZjZpJJCgXbN0kpklOMwZsqWAf3mwsoZhDgeUOat1/g5xIe0aAA1SGOXUx0cl2XmAd UwlH3XnyAbwO8LN2x06jlI63BrzjcL8ovIpSATJnvEdw5xRdTySua+smrzh68BGKRMxs T4g98vmhKMzi2yvxSKJJcAnfa90WqYR6gE02XdUz7X3UgELeEuOcuOt3cFuICIidi6R2 3ceXk4PYLLuXZXwquregRUhjr/4SVeyk5hmFWxPgUp79BCupvBdQy9h/gjlTZZtdjths 4TgwC5h+0twDnK4sLcZ02Z4EFYjdLIrUlOiS22faivU9uAZumfQBG40DJeZ0VoXKTpU2 H6+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=NPlMasGYo4lGw0lOkAqZc40GZj6GYdL8PF1G2kuHIIE=; b=Tfz8wk7d5uTdEb1Dr6GsPTEUUZJnRkhazVnZWj/mnxJWoGXe1kg/XjHkDNOHyLo4wv N/qQgSheL5P0eW49joO743dXQMPB+1TJFwUbvPc8cOZb/O4CQLayu5zXJTjW8CMkngT9 VAeMYJku13uvgm1EXcOCOoeC6ivagvbcSvidD8M01Z17VlGq3G1DF9tkr5EIdmsQ4XM8 fcA3zWGUFVYgFSpBMKsnxYP2+2mfsrYyLDeQt1q4V5d1uAiSCxO6leWNWoEMs20aZ2JK Epkgns/3PB70vPof7+SQWGA1iYHSosaeCdfzkT7ckszUdruXLuIYK0fRzxvBQJNJH9VP +Qpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p9uWOVEb; 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 i23si18162271ila.157.2021.07.19.02.01.10; Mon, 19 Jul 2021 02:01:21 -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=p9uWOVEb; 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 S235620AbhGSISq (ORCPT + 99 others); Mon, 19 Jul 2021 04:18:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:39372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235642AbhGSISp (ORCPT ); Mon, 19 Jul 2021 04:18:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 678D16100C; Mon, 19 Jul 2021 08:23:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626683018; bh=psjqFkgBEdDqYXlksaHaln38UuS8wGxXvJHwZlCLzbU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=p9uWOVEbJZ81vMLz3GvXjxBZCrKXPWO3uk5YbvM3O7HaOlEMLAzLVvG6Z72vUtpk6 Pf0qRZLW1vaoHR1jSMwKPP0P6S+/HFoIoF9a4W1tuD3VsiLDe6n2aNp8P1MlH1kKji zfnJQ/Yzg0UK7+QPUovRTSmPQsmRcthEUFgoTo20de4WGjtfpyHuJGrhUp3By2Uiqo wB3qMBalTYOoypDkDz72Bluv+u0A2VWcgnxC+Hp4vD2Xe/15NxHndeCUL4CEMPfDdT 0RuXvb+s/GsQulNJ6EdU5CKufX/1jwqOq32nsZGCao9zLfR1IQxey8Nk+hfWfeEhtr 8FDTUWDIychOQ== Subject: Re: [f2fs-dev] [PATCH] f2fs: let's keep writing IOs on SBI_NEED_FSCK To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: stable@kernel.org References: <20210714231850.2567509-1-jaegeuk@kernel.org> From: Chao Yu Message-ID: Date: Mon, 19 Jul 2021 16:23:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210714231850.2567509-1-jaegeuk@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/7/15 7:18, Jaegeuk Kim wrote: > SBI_NEED_FSCK is an indicator that fsck.f2fs needs to be triggered, so it > is not fully critical to stop any IO writes. So, let's allow to write data > instead of reporting EIO forever given SBI_NEED_FSCK. Well, it looks we need to check why there is SBI_NEED_FSCK flag. If this patch breaks something, how about forcing OPU if SBI_NEED_FSCK was set? > > Fixes: 955772787667 ("f2fs: drop inplace IO if fs status is abnormal") > Cc: # v5.13+ > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/segment.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index 15cc89eef28d..f9b7fb785e1d 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -3563,7 +3563,7 @@ int f2fs_inplace_write_data(struct f2fs_io_info *fio) > goto drop_bio; > } > > - if (is_sbi_flag_set(sbi, SBI_NEED_FSCK) || f2fs_cp_error(sbi)) { > + if (f2fs_cp_error(sbi)) { > err = -EIO; > goto drop_bio; > } >