diff options
author | Jin Xu <jinuxstyle@gmail.com> | 2013-08-15 19:17:01 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-08-19 09:43:25 +0900 |
commit | 92c4342fb72a6baf9ee9fcd079b46ed0286ebe33 (patch) | |
tree | aa7440560a53778038c6f1a693753e40e93e5c02 /fs/f2fs/segment.c | |
parent | e27dae4d663762da2020e93885be2219f0608ec6 (diff) | |
download | linux-92c4342fb72a6baf9ee9fcd079b46ed0286ebe33.tar.gz linux-92c4342fb72a6baf9ee9fcd079b46ed0286ebe33.tar.bz2 linux-92c4342fb72a6baf9ee9fcd079b46ed0286ebe33.zip |
f2fs: avoid writing inode redundantly when creating a file
In f2fs_write_inode, updating inode after f2fs_balance_fs is not
a optimized way in the case that f2fs_gc is performed ahead. The
inode page will be unnecessarily written out twice, one of which
is in f2fs_gc->...->sync_node_pages and the other is in
update_inode_page.
Let's update the inode page in prior to f2fs_balance_fs to avoid
this.
To reproduce it,
$ touch file (before this step, should make the device need f2fs_gc)
$ sync (or wait the bdi to write dirty inode)
Signed-off-by: Jin Xu <jinuxstyle@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
0 files changed, 0 insertions, 0 deletions