Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp853559pxv; Wed, 14 Jul 2021 17:33:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymhOWTvVEZj4qPwcOMY82AzR/rQxTltR2P3jCh6bYzUpdI8yEFiNjW3uOUMQzHjtWyq20r X-Received: by 2002:a02:2382:: with SMTP id u124mr784102jau.138.1626309205384; Wed, 14 Jul 2021 17:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626309205; cv=none; d=google.com; s=arc-20160816; b=dINh+OlKxzEjO1mAzbOUj8S4U6zFOLTrbnG4I7MQl6qylwIo+YIWmD3rFU1m6uF3eb 20jA3VqbdcRxpsoiyFoRSVyg7DKAeRVIgSemoU5fJkB1aQQNCMHZjBpfEld4cBDFTB5O 3dC3IGuMuTd8yOPlKofn/7gHssgLqbuV4Qs9gBOsdOibjAEiWOB31InrGIpj3V8Ua3np YBr+ip0iM5RlACblXsfs84jHqxRD230aGR5YfXwkvRjkjBkG/MllmXpZ/ywL6z5D/AHf XNQccg6PxRiv+/CU6HF+pLAOqXCyUOHkk5xXE6QjimGF//fH+78nxElnt7JoL2gnj3ro TayQ== 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=Xd3JDUAAJoq2Ies4rf5gq8hoTQsuvdhZU8OrstZw0E4=; b=uCMRvF9wCttmnm1Lxr6s52hMBicAqTzlaPWuoJJbdLKCQS7BkxYT9LeDvSuNxNYhw4 hpkTJTN83IdhrZ1R1Xf1Yith/yI9COWzzSRQ5t0zEOx5i4zkj4OrmWHbcAydmcvd+SHq tRjLn1sJFG4gaV3q5/nqxlqX8tzZunESt5fjZH4v/Z1GLZw5e2UKwdmqt+7wSYQ+U3bD KmA/CN9+qNiPGLmzZG2tbi3a+y1O5AGn4xqmcmrbO/j0MEfGoe5Rb0xI2afnsy6wB2ST tazGLvXroGZj7f+aX0RWHg6jgm9EdQ1aAjh9gt92y7MOxLcTf8gh0nbZsNIUoVB5/Dbe OjqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F10JlT0a; 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 n24si4291504jal.91.2021.07.14.17.33.13; Wed, 14 Jul 2021 17:33:25 -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=F10JlT0a; 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 S236460AbhGNXVq (ORCPT + 99 others); Wed, 14 Jul 2021 19:21:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbhGNXVq (ORCPT ); Wed, 14 Jul 2021 19:21:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 512066136E; Wed, 14 Jul 2021 23:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626304734; bh=7ibYkMa/Q/QRDj3MQt3Cl24drEViJhJqRnCGjYpxIHQ=; h=From:To:Cc:Subject:Date:From; b=F10JlT0arMKc1w9jpjBvlC8MdN0dv2pvzJX2g8QZ4wF4w7y1CYduAQdwjJXVANBYt cTdzkVnI4f+0vOCD8HyAiuiR8xcE6+KiOyEV1N0vQv+Jd+qU4F02blA7lPVxH94m8H 5FX/CUOoSlVgp2VkAsonkccFGL8lSSTw2+0lhvWuS3oj2NDUrq0rVzGMTYannmyLcT b2kzz/LQVAVDvj2Qm3wuvkL1dPgFue/NI0B88BZ0f1FvCrXmjPConh63ON7XonqmI5 VLnhJO+RQjxOW3uodo4RcyRtVC3YENIxHj3EfZgOSRQ/fn5zSw4R9KStbEdJhU4NAa h5sMSqnEe/9mA== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim , stable@kernel.org Subject: [PATCH] f2fs: let's keep writing IOs on SBI_NEED_FSCK Date: Wed, 14 Jul 2021 16:18:50 -0700 Message-Id: <20210714231850.2567509-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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; } -- 2.32.0.93.g670b81a890-goog