* [PATCH] f2fs: write only the pages in range during defragment
@ 2015-12-14 5:34 Fan Li
2015-12-14 5:53 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Fan Li @ 2015-12-14 5:34 UTC (permalink / raw)
To: 'Jaegeuk Kim'; +Cc: linux-f2fs-devel
@lend of filemap_write_and_wait_range is supposed to be a "offset
in bytes where the range ends (inclusive)". Subtract 1 to avoid
writing an extra page.
Signed-off-by: Fan li <fanofcode.li@samsung.com>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 294e715..5fac4f2 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1686,7 +1686,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi,
/* writeback all dirty pages in the range */
err = filemap_write_and_wait_range(inode->i_mapping, range->start,
- range->start + range->len);
+ range->start + range->len - 1);
if (err)
goto out;
--
1.7.9.5
------------------------------------------------------------------------------
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] f2fs: write only the pages in range during defragment
2015-12-14 5:34 [PATCH] f2fs: write only the pages in range during defragment Fan Li
@ 2015-12-14 5:53 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2015-12-14 5:53 UTC (permalink / raw)
To: 'Fan Li', 'Jaegeuk Kim'; +Cc: linux-f2fs-devel
> -----Original Message-----
> From: Fan Li [mailto:fanofcode.li@samsung.com]
> Sent: Monday, December 14, 2015 1:34 PM
> To: 'Jaegeuk Kim'
> Cc: linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev] [PATCH] f2fs: write only the pages in range during defragment
>
> @lend of filemap_write_and_wait_range is supposed to be a "offset
> in bytes where the range ends (inclusive)". Subtract 1 to avoid
> writing an extra page.
>
> 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-12-14 5:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 5:34 [PATCH] f2fs: write only the pages in range during defragment Fan Li
2015-12-14 5:53 ` 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).