Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2322295pxb; Mon, 23 Aug 2021 18:10:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUEggD6eQhZsKf81mmZVitGZcTem9GeczSsXS8ws4paKXm7BVpO8J2lLqtAstFMRWQACHu X-Received: by 2002:aa7:c1c4:: with SMTP id d4mr39696427edp.301.1629767452688; Mon, 23 Aug 2021 18:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629767452; cv=none; d=google.com; s=arc-20160816; b=IcVATJZ6QpOSBPxYl08pB438Wr0B/wQaHg5jsdTEsMSmC3EheRnac++tJ+lHtvRphh XRjHX1QF36FZ0sb9dsvL7p2Yto1bSmYZ05gqr4pgAPtBSCFbzN1s5frLZbDhWDlFjeMf FggWvQsTmRCVW1DJzICuLHrEgLG8dLeSoEMRy6pFDeOXlO0ZpWk6W7qrIXne76WrcrO/ TnaQjlCLb05r9/S6NhKHweDkpQlpXSPWnGEPLBPXOv/5JYTGwI/7EGFENVwUC3OQVJD+ uKOKW8OQn5YDoUk+Zd2troY9hJ36PpnrMZOo53mJcEqjH867YnbotHWsmUIBR5DTX224 baYQ== 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 :to:subject:dkim-signature; bh=LSQQ8f2336RqKfQCfFwxIJbJmAz6IrEiwfJq0dXEJHs=; b=VI1QRverQo4No25xJC+Y1h//O56s7aWlmIv0RceRaR2Ovo8s2UJozvYL7mKlJJPnd5 gXWlwto+4f8U/mouB12iyq5nxSjaDJJDH+s69DFFM+D+NKgf1v8G4RE5pIgiGqFFe206 WYezqeyUaC/JDVEWq3auNnzdBfffjTg+SfYAdUGw3E2j9GGB2YgAYhCiPR3G9FxknNVD Vmdekyk11QGXLoSRhQJ1rGWOxi6uO+tthON5XN/unORLJjyily8pajJffsHlz+s2Agib tFPdBff9L+IPUZobq2P9o2uk/KlgV8w5uriQ7s0b2WffNydlqg4mC2gcPQYkLLkMnG/G wBFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=peUVUEi8; 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 h15si9443717ede.550.2021.08.23.18.10.29; Mon, 23 Aug 2021 18:10:52 -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=peUVUEi8; 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 S229742AbhHXBJl (ORCPT + 99 others); Mon, 23 Aug 2021 21:09:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:37482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233656AbhHXBJ2 (ORCPT ); Mon, 23 Aug 2021 21:09:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 516CA60E75; Tue, 24 Aug 2021 01:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629767324; bh=LSQQ8f2336RqKfQCfFwxIJbJmAz6IrEiwfJq0dXEJHs=; h=Subject:To:References:From:Date:In-Reply-To:From; b=peUVUEi8Ed4L1jgy0LaSo37hcPqErMZWI5INKYQYW7tajawga1E+uVRgJ0nXa0h8i nq+WNmTwJHGPq69mfkud/yitLjBCu9Sxa2iZaDlnvgsEbdt7IgLQRxJOto24XjSEib +HzEG5R8II8SVf017lbNUjBBESc5MvrY+YwZCKvlkEj0Bx4LDGiezdql+sE478/3mG Wum3s+qyR4bUrFJmfWi08MBOp9jAm7mlPwFHtFJlzpydoGDCPlhRbKKybijJZS2wjr z4H5pq7UdlyLoF9z7nUp/nCBQSTYOdbD7zG9ieNkBlYFIARjDu9kiMqdKq7ev4uN1O HTc+yD3IQvEyA== Subject: Re: [f2fs-dev] [PATCH] f2fs: don't ignore writing pages on fsync during checkpoint=disable To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20210823170151.1434772-1-jaegeuk@kernel.org> From: Chao Yu Message-ID: Date: Tue, 24 Aug 2021 09:08:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210823170151.1434772-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/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? Thanks,