Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2567568ybl; Thu, 29 Aug 2019 09:52:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZCgvBRpTM9OnfUG0tSbLHVfAX8++eLBhgtxgfImkyAtxQNSzND96RZzOr17wP3PGexHXy X-Received: by 2002:a17:902:8a81:: with SMTP id p1mr10650039plo.71.1567097560411; Thu, 29 Aug 2019 09:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567097560; cv=none; d=google.com; s=arc-20160816; b=qOnvFy8P5EnlBgXy9apQDgw7/QTEHIjK9JLN/szoR+n4ZiNBWODN1LL36H8qEhp1Nu MCT+Gx0Lwk031m9Mtt2K+WF7vKBUpGyfpKlZicYi+goY95bdTelNFaFNbVQi+uBS9k5p HIw3GTjG0pLmgCWwxC29++weKvzrBIsr7WWWUkUpOzEyPHjBnWvtDx8Ad64HC5gJ/cPU ZQTUL1l5MiBwQx+QAQQkcf8ke8mzh7uLk+KRV3UAD2GOOa/IcoAbPzutt9W6YQ4I80Al 3lUQPxdtHeSiD5U41ZUdEHVxBAcxO9F9SBT7Gxp/FdIBTnuM3JHm8vku6fUxxw9y+Ryj Ccpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=f02ixKEChl3x81FOxNAZoItbCFgRRC7o0n5cnyxWNsM=; b=csLpHU39eWS8eF1VBrwHc6XcZhvzIU3lAUDbirsIf3ELOyYUwwL1WwtFKe9JB7w1iI jqPFkC0wGWA+P4IvfwYa4DNcon92NpudeA/eR6xWEgZPvv0QA/LGCnl2Q7TEdGFdrrAS RlHMMxUCW7EJTDz2qqdnV5naunEI0BxGfRSknzHvNUGsaLc4oW4hQlT4v5ISu/p5ZnYd hXsmPcSjDzvOtmr+BG56Q0NfTtyjN0DGwYxyI0MYA6m8x/NPaIhz541vhLeGjE2r4Eob k/At6ThR/pkwVPqYju1ls/XLO0cNsOCI0xd9ydWMPFhd30MAiruzy5e66DBSIOy79qZy M0Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BWIBnFoC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j20si2342749pgk.115.2019.08.29.09.52.25; Thu, 29 Aug 2019 09:52:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BWIBnFoC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727410AbfH2QuK (ORCPT + 99 others); Thu, 29 Aug 2019 12:50:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:50968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfH2QuK (ORCPT ); Thu, 29 Aug 2019 12:50:10 -0400 Received: from localhost (unknown [104.132.0.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DBAC9208CB; Thu, 29 Aug 2019 16:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567097409; bh=Hslj8UGkEo+uEL+vuwTBz4V9Schqb3dk989zc+CeNYE=; h=From:To:Cc:Subject:Date:From; b=BWIBnFoCvnav1ZFWTSGjiXYAqgdO6IavKgAGKHeWQ68Cc1JGSC2R8HG/ChKL+FbEq q+SP4H7f3RZ/XFAQedch6EeKn8vQf3q/We5z94rbTYMiOKvPzYwsaDNHQyJRVx6qyf Z1jhCqpYdPUGisEw3PHHzp6C+/zAWX590OKClHR4= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH] f2fs: fix flushing node pages when checkpoint is disabled Date: Thu, 29 Aug 2019 09:50:08 -0700 Message-Id: <20190829165008.71226-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes skipping node page writes when checkpoint is disabled. In this period, we can't rely on checkpoint to flush node pages. Fixes: fd8c8caf7e7c ("f2fs: let checkpoint flush dnode page of regular") Fixes: 4354994f097d ("f2fs: checkpoint disabling") Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e5044eec8097..8b66bc4c004b 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1524,7 +1524,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) goto redirty_out; - if (wbc->sync_mode == WB_SYNC_NONE && + if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED) && + wbc->sync_mode == WB_SYNC_NONE && IS_DNODE(page) && is_cold_node(page)) goto redirty_out; @@ -1909,7 +1910,8 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi, } if (step < 2) { - if (wbc->sync_mode == WB_SYNC_NONE && step == 1) + if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED) && + wbc->sync_mode == WB_SYNC_NONE && step == 1) goto out; step++; goto next_step; -- 2.19.0.605.g01d371f741-goog