Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3967249pxv; Mon, 19 Jul 2021 13:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZh5+1U7knPfC8PEcjhnT2NE5LvZ8cSog11Ry5NjEwJQHttCVGIWZquSNGmVs89wDqCZpk X-Received: by 2002:a05:6402:10d9:: with SMTP id p25mr10791650edu.51.1626725311251; Mon, 19 Jul 2021 13:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626725311; cv=none; d=google.com; s=arc-20160816; b=BzxMcRVn18dllfXhZvreSLSJHB0gLOFPU9gaQJJbdEmM+3zbJdQJDr10rYPBdKT/Y3 B6QjMmgZh2DY/rZuKIF36GZRztspu4XweUynmlrY4EJxQQQbtbNYBuuDxMbNwORy9WTp womAaT0daHM5vbv2pYo+GP8CpqrxdBeXIT2SNbzXL0yeu6QGQporqWvynq8zVQeC2Hhq 3eeu3sbbUo6WcYp9kvywLwdW5Pq0Ri4MUQk4hjgtcnCKB1mKK/stmINeq2THkrYR7fZn 7LQ0IyyJMrfAp/RRvFPhX5taiqelsUvJJV67dzgv3McYTjJ+4HPMMxjryA6BdS+BmIBs wFOw== 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=FIACMyb6FxXKLX7whhx0ufYLHapnKBy4scCKXXrQwxE=; b=kqGDrIjylZAfM8nYv1rUQ+9oLWJQujc813eJQgUjbUGAsDQRkLJEDErdEi2dnTjdRO N/nELJo9WNcXcyJs7oIYd/i/bLV0iUWX21Ld1APDO8ipDwte/qNsG93Hklsd3F11mbIA kIYU6q/zS8DF3MTYzmFFjY994kuuI9gR1wfmAblUNw+owp27oVQ4lwqGHnDeVfVkjwEe uwPzTIB1NOxnWIQuAyyJsdLxF2M+vquAV0jueCxRZ2TUV7RVhcoBRZ9VV45Y2ecJgJqT 9SEH9e1JPnaB5pXDRpf0OBU8C/NWxNn1+Ngp5sXf4Rr9vc2lG83ujIhRp2j2JpQM6KLC 3rfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fSImICV0; 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 d2si23333699ejd.638.2021.07.19.13.07.43; Mon, 19 Jul 2021 13:08:31 -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=fSImICV0; 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 S1384477AbhGSS3q (ORCPT + 99 others); Mon, 19 Jul 2021 14:29:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:38778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383708AbhGSSJT (ORCPT ); Mon, 19 Jul 2021 14:09:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A9DE60232; Mon, 19 Jul 2021 18:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626720598; bh=rlRvHesfEjeUlsO8Hwp41C5FiOVzlwcYj70KV6aM430=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fSImICV0ySVrVR3XZl3Xw3ry0LlnwYEk3HBW7QQZP1TAwwbEfD4rRqaJDRZECY0ty yj3TjzDU7LJFtDv1ntxUu/Wgy9HkJRlMxH41e3Xx7TgwukhBsUaLjTMzz/laRHyh1j ElmgTbrKCPw+dxvtBExYdrNCh/QFokPSlt+kU6Clpm1wKLriflubYNMLVAx0zwGCVc NLE+EmS1Uq8kf0cJlKN3cWrliF+TM3429JfhU2Xg/XrrLknI9aFneYR42pdMaW5b2q bjGW99cfwJmAbIaalyugU8y0mZd/CQJ7ueKgZ5NMzZImmo0xsN1ianOQBbAbsSgept Uod9M75DXoOHA== Date: Mon, 19 Jul 2021 11:49:57 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, stable@kernel.org Subject: Re: [f2fs-dev] [PATCH] f2fs: let's keep writing IOs on SBI_NEED_FSCK Message-ID: References: <20210714231850.2567509-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/19, Chao Yu wrote: > 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? Yea, let me take that. > > > > > 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; > > } > >