From: Jaegeuk Kim <jaegeuk@kernel.org> To: Chao Yu <chao@kernel.org> 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 Date: Wed, 25 Aug 2021 14:31:43 -0700 [thread overview] Message-ID: <YSa2v7oLMAWZP+b5@google.com> (raw) In-Reply-To: <d0a48947-e4df-9b0f-735e-6b306a64c4fe@kernel.org> On 08/25, Chao Yu wrote: > On 2021/8/25 1:09, Jaegeuk Kim wrote: > > 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 > > Oh, I doubt that we may failed to flush data of all inodes due to failures during > sync_inodes_sb(), additionally, how about adding retry logic for sync_inodes_sb() > if there is still any F2FS_DIRTY_DATA reference counts in f2fs_enable_checkpoint() > to mitigate this issue, e.g.: > > f2fs_enable_checkpoint() > > do { > sync_inode_sb(); > congestion_wait(); > cond_resched(); > } while (get_pages(sbi, F2FS_DIRTY_DATA) && retry_count--) > > if (get_pages(sbi, F2FS_DIRTY_DATA)) > f2fs_warm(""); Agreed. Sent v2. > > Thanks, > > > checkpoint=disable test. I don't think this hurts anything but can see > > some mitigation of the issue. > > > > > > > > Thanks,
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org> To: Chao Yu <chao@kernel.org> 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 Date: Wed, 25 Aug 2021 14:31:43 -0700 [thread overview] Message-ID: <YSa2v7oLMAWZP+b5@google.com> (raw) In-Reply-To: <d0a48947-e4df-9b0f-735e-6b306a64c4fe@kernel.org> On 08/25, Chao Yu wrote: > On 2021/8/25 1:09, Jaegeuk Kim wrote: > > 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 > > Oh, I doubt that we may failed to flush data of all inodes due to failures during > sync_inodes_sb(), additionally, how about adding retry logic for sync_inodes_sb() > if there is still any F2FS_DIRTY_DATA reference counts in f2fs_enable_checkpoint() > to mitigate this issue, e.g.: > > f2fs_enable_checkpoint() > > do { > sync_inode_sb(); > congestion_wait(); > cond_resched(); > } while (get_pages(sbi, F2FS_DIRTY_DATA) && retry_count--) > > if (get_pages(sbi, F2FS_DIRTY_DATA)) > f2fs_warm(""); Agreed. Sent v2. > > Thanks, > > > checkpoint=disable test. I don't think this hurts anything but can see > > some mitigation of the issue. > > > > > > > > Thanks, _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2021-08-25 21:31 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-23 17:01 [PATCH] f2fs: don't ignore writing pages on fsync during checkpoint=disable Jaegeuk Kim 2021-08-23 17:01 ` [f2fs-dev] " Jaegeuk Kim 2021-08-24 1:08 ` Chao Yu 2021-08-24 1:08 ` Chao Yu 2021-08-24 17:09 ` Jaegeuk Kim 2021-08-24 17:09 ` Jaegeuk Kim 2021-08-24 23:30 ` Chao Yu 2021-08-24 23:30 ` Chao Yu 2021-08-25 21:31 ` Jaegeuk Kim [this message] 2021-08-25 21:31 ` Jaegeuk Kim 2021-08-25 21:33 ` [PATCH v2] " Jaegeuk Kim 2021-08-25 21:33 ` [f2fs-dev] " Jaegeuk Kim 2021-08-26 0:16 ` Chao Yu 2021-08-26 0:16 ` Chao Yu 2021-08-26 16:52 ` [f2fs-dev] [PATCH v3] " Jaegeuk Kim 2021-08-26 16:52 ` Jaegeuk Kim 2021-08-27 14:36 ` Chao Yu 2021-08-27 14:36 ` Chao Yu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YSa2v7oLMAWZP+b5@google.com \ --to=jaegeuk@kernel.org \ --cc=chao@kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.