Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2924356pxb; Tue, 24 Aug 2021 10:43:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmQ5Fi+uiRqgXNwZd+6SKyETPF9jVQ7GpTqn6Anxy4ZcW0j5NE/reea+udfaDbREkTwj2H X-Received: by 2002:a05:6602:1503:: with SMTP id g3mr32625172iow.25.1629826996454; Tue, 24 Aug 2021 10:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629826996; cv=none; d=google.com; s=arc-20160816; b=XUsJ0S6qHXFFnwPHibU37Jo3xRxyqhBO7SqoRgXuvjI8rA4N4iyOT1nNhO513L+7Ss uX8yWaVaCQwY7esIQrsUCHU9Dsooe7/o95CdLAzuBmrVGACn6OzvrPg5fZ1SX+XfU7rc rkvdqB6MfpkuXKT7h9s03ejXS2z2tl4LIffpfM7mMl8TLc9J3iIaO3qtnmZgrVCrYsCH Na9W4ImYovnhK2JarhmpZhNbJeVhjOK9eRhHaW5CTaKEFVClyRLXRo1VTNzMYEb7HliV GXB7g1gUTT33/F91ysC9NYWc+n6SwS1K4rjzXYr3wOQPtMSPaKXBZsxvCsS7VC43vYuL SEuw== 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=V2MTz9cQbW6iOz9s5K63TnyC6Zgxqq4IL2SaMXC9LcI=; b=jBGVALULeXRk2BRLdGmkZfsh/ISMyYg3q2Z9JtogcsoanqvYIQxFpGdZS0WvYAWcg3 bN6A4Y6sQ6wGD3l53KvOWHBJB4EHnQuE7yc9lorRCpI7/HBvRtDht9nHX2e0/kW9ShpY TZI3XiKp7PYnC0HC/LaYRKa4/29UxOEUk7JYI/kFtqz9R7N29g8rw2jYQOBFz8tvbZl9 MWktQQ9/NXZnzblXbT5Cn5p47MCSwEWpUehmLPeTbPrrnO/ivDnBwxSrpUozZkDMrlql /2WcDIdhFxEBRPHRQZwhVwIuibhWRsdKaqCOo2ILQyvje8A5QBHRbWT4meboYBLhuMYt 9IAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m6mudTay; 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 r10si18543240jap.64.2021.08.24.10.43.04; Tue, 24 Aug 2021 10:43:16 -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=m6mudTay; 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 S239851AbhHXRmE (ORCPT + 99 others); Tue, 24 Aug 2021 13:42:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:43444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242405AbhHXRjP (ORCPT ); Tue, 24 Aug 2021 13:39:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ACB4B613DB; Tue, 24 Aug 2021 17:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824983; bh=k6/DyiNxY9iHMyx+vqOZpeLhFY0OrsTTDraIpNfySmk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m6mudTayuZeB7SiPMQXlGDH/1inDLPr+v9d0hlxVFaVmSr3pb9tz574iWPfbBC7N2 jA5Lsn9U3zT49DcTaRzhe3Vs+4/tQqI3b0DLFlfBHDYpfPjSu2UJLsx14S5yh+kPCb uTcmtS1OufW7MKSbzo4MpzjbVg1xwxjN55SWRdowLT1hi1lcjntZoNeUGHkYnkxhnL OiHmQrIOmx8BA5DlrI+ZJKHCv9pkrhueHI52J8sZueo4exQ5m9lFi9Jlb7awJfYL1r PZPYvuouE3yOGDwC0wGwDOY1pkIuXWHFeY+hoY4qjv9e7RHtaS44Ia0dRtxnxVpg7P HOEi52W+z4HkQ== Date: Tue, 24 Aug 2021 10:09:42 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: don't ignore writing pages on fsync during checkpoint=disable Message-ID: References: <20210823170151.1434772-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 08/24, Chao Yu wrote: > On 2021/8/24 1:01, Jaegeuk Kim wrote: > > We must flush dirty pages when calling fsync() during checkpoint=disable. > > Returning zero makes inode being clear, which fails to flush them when > > enabling checkpoint back even by sync_inodes_sb(). > > Without this patch, file can be persisted via checkpoint=enable as well, my > testcase: > > - mount -t f2fs -o checkpoint=disable,checkpoint_nomerge /dev/pmem0 /mnt/f2fs/ > - cp file /mnt/f2fs/ > - xfs_io /mnt/f2fs/file -c "fdatasync" > - mount -o remount,checkpoint=enable /dev/pmem0 /mnt/f2fs/ > - umount /mnt/f2fs > - mount /dev/pmem0 /mnt/f2fs > - md5sum file /mnt/f2fs/file > chksum values are the same. > > Am I missing something? I'm trying to address one subtle issue where a file has only NEW_ADDR by the checkpoint=disable test. I don't think this hurts anything but can see some mitigation of the issue. > > Thanks,