From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F13EC4338F for ; Tue, 24 Aug 2021 01:09:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77F2B6127B for ; Tue, 24 Aug 2021 01:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233101AbhHXBJm (ORCPT ); Mon, 23 Aug 2021 21:09:42 -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, From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 534B1C4338F for ; Tue, 24 Aug 2021 01:08:55 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D41C6127B; Tue, 24 Aug 2021 01:08:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0D41C6127B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.92.3) (envelope-from ) id 1mIKvt-0006RV-Ic; Tue, 24 Aug 2021 01:08:53 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mIKvr-0006RN-Gt for linux-f2fs-devel@lists.sourceforge.net; Tue, 24 Aug 2021 01:08:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LSQQ8f2336RqKfQCfFwxIJbJmAz6IrEiwfJq0dXEJHs=; b=mdaNBPkz6bJBaP22s423bRnpJ5 IQJ3Wotnr8mg2W9c7f/9PmjqOUE/QMllIQXWaks5xBlwYPVZXKTtlLB4/iN/tudOGTJQstZBYLXnq AXQfhanU8ieZa4O+TdJApbQcnfWBywiaE1F6bXSzMeat5OuNjcYR6lpJN3m/4aYAssPw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LSQQ8f2336RqKfQCfFwxIJbJmAz6IrEiwfJq0dXEJHs=; b=lPC1XEc6EFzFcXCITUCHYBUm8B tOguub0BI3S0+dtXcEU7JzCxf4mWSqJ3864269hUepCz0YLilV8vSbo2/ip5QsOkftHRFPBJGUuqL AKz9kDxYhEpbZTYZXfiJo4g5DoW2vKaKeJm9fU+U8aquKef8JkYqji9IVrwMIBHAwb9Y=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mIKvq-0004yq-Bk for linux-f2fs-devel@lists.sourceforge.net; Tue, 24 Aug 2021 01:08:51 +0000 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== 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-Language: en-US X-Headers-End: 1mIKvq-0004yq-Bk Subject: Re: [f2fs-dev] [PATCH] f2fs: don't ignore writing pages on fsync during checkpoint=disable X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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, _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel