summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-03-17 17:16:35 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2015-04-10 15:08:46 -0700
commit3c6c2bebef79999b1827041696dc1881e637e3af (patch)
tree32391cbf119529871a6663ed62d5ab0b2e94a09e /fs/f2fs/data.c
parent83e21db6939dd6ff50a81d54aaef4b44847aefff (diff)
downloadop-kernel-dev-3c6c2bebef79999b1827041696dc1881e637e3af.zip
op-kernel-dev-3c6c2bebef79999b1827041696dc1881e637e3af.tar.gz
f2fs: avoid punch_hole overhead when releasing volatile data
This patch is to avoid some punch_hole overhead when releasing volatile data. If volatile data was not written yet, we just can make the first page as zero. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index f0a18a005..486113d 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1291,6 +1291,8 @@ int do_write_data_page(struct page *page, struct f2fs_io_info *fio)
write_data_page(page, &dn, fio);
f2fs_update_extent_cache(&dn);
set_inode_flag(F2FS_I(inode), FI_APPEND_WRITE);
+ if (page->index == 0)
+ set_inode_flag(F2FS_I(inode), FI_FIRST_BLOCK_WRITTEN);
}
out_writepage:
f2fs_put_dnode(&dn);
OpenPOWER on IntegriCloud