* [PATCH] f2fs: Change the timing of f2fs_wait_on_page_writeback
@ 2015-08-04 5:27 Fan Li
2015-08-04 10:00 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Fan Li @ 2015-08-04 5:27 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel
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.
Signed-off-by: Fan li <fanofcode.li@samsung.com>
---
fs/f2fs/data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 57042bd..364840f 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -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
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] f2fs: Change the timing of f2fs_wait_on_page_writeback
2015-08-04 5:27 [PATCH] f2fs: Change the timing of f2fs_wait_on_page_writeback Fan Li
@ 2015-08-04 10:00 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2015-08-04 10:00 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel
> -----Original Message-----
> From: Fan Li [mailto:fanofcode.li@samsung.com]
> Sent: Tuesday, August 04, 2015 1:28 PM
> To: jaegeuk@kernel.org
> Cc: linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev] [PATCH] 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.
>
> Signed-off-by: Fan li <fanofcode.li@samsung.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-04 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04 5:27 [PATCH] f2fs: Change the timing of f2fs_wait_on_page_writeback Fan Li
2015-08-04 10:00 ` 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).