Skip to contentSkip to conversation

f2fs: Change the timing of f2fs_wait_on_page_writeback

PATCH In review Fan Li 2 participants 2 messages Aug 4, 2015 F2FS file system

lore
Share & tools
lore

Fan Li

author
#0 lore raw

PATCH 1/1 f2fs: Change the timing of f2fs_wait_on_page_writeback

some backing devices need pages to be stable during writeback. It doesn't matter if
the page is completely overwritten or already uptodate, it needs to wait before write.

---
 fs/f2fs/data.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/f2fs/data.c +2 -2
@@ -1386,13 +1386,13 @@ put_next:
 	f2fs_put_dnode(&dn);
 	f2fs_unlock_op(sbi);
 
+	f2fs_wait_on_page_writeback(page, DATA);
+
 	if (len == PAGE_CACHE_SIZE)
 		goto out_update;
 	if (PageUptodate(page))
 		goto out_clear;
 
-	f2fs_wait_on_page_writeback(page, DATA);
-
 	if ((pos & PAGE_CACHE_MASK) >= i_size_read(inode)) {
 		unsigned start = pos & (PAGE_CACHE_SIZE - 1);
 		unsigned end = start + len;

--
1.7.9.5

------------------------------------------------------------------------------

Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines

-----Original Message-----
From: Fan Li [mailto:[email protected]]
Sent: Tuesday, August 04, 2015 1:28 PM
To: [email protected]
Cc: [email protected]
Subject: [f2fs-dev] [PATCH] f2fs: Change the timing of f2fs_wait_on_page_writeback

Quoted 6 lines

some backing devices need pages to be stable during writeback. It doesn't matter if
the page is completely overwritten or already uptodate, it needs to wait before write.

------------------------------------------------------------------------------