linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: fix to wait page writeback during revoking atomic write
@ 2018-04-23  2:36 Chao Yu
  2018-04-23  2:36 ` [PATCH 2/3] f2fs: clean up commit_inmem_pages() Chao Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chao Yu @ 2018-04-23  2:36 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

After revoking atomic write, related LBA can be reused by others, so we
need to wait page writeback before reusing the LBA, in order to avoid
interference between old atomic written in-flight IO and new IO.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index cba59fc58eb6..24299f81f80d 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -231,6 +231,8 @@ static int __revoke_inmem_pages(struct inode *inode,
 
 		lock_page(page);
 
+		f2fs_wait_on_page_writeback(page, DATA, true);
+
 		if (recover) {
 			struct dnode_of_data dn;
 			struct node_info ni;
-- 
2.15.0.55.gc2ece9dc4de6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-18  1:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-23  2:36 [PATCH 1/3] f2fs: fix to wait page writeback during revoking atomic write Chao Yu
2018-04-23  2:36 ` [PATCH 2/3] f2fs: clean up commit_inmem_pages() Chao Yu
2018-04-23  2:36 ` [PATCH 3/3] f2fs: wait IO writeback in commit_inmem_pages() Chao Yu
2018-04-23 15:01   ` Jaegeuk Kim
2018-05-18  1:26 ` [PATCH 1/3] f2fs: fix to wait page writeback during revoking atomic write Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).