diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-22 22:23:35 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-30 19:14:09 +0100 |
commit | 2a3407607028f7c780f1c20faa4e922bf631d340 (patch) | |
tree | 77385c73948461f554fcc71e831e1bf81bb5295f /fs/f2fs/inline.c | |
parent | f2fs: reduce covered region of sbi->cp_rwsem in f2fs_map_blocks (diff) | |
download | linux-2a3407607028f7c780f1c20faa4e922bf631d340.tar.xz linux-2a3407607028f7c780f1c20faa4e922bf631d340.zip |
f2fs: call f2fs_balance_fs only when node was changed
If user tries to update or read data, we don't need to call f2fs_balance_fs
which triggers f2fs_gc, which increases unnecessary long latency.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 8090854dd29c..c24e5d93720d 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -202,6 +202,10 @@ out: f2fs_unlock_op(sbi); f2fs_put_page(page, 1); + + if (dn.node_changed) + f2fs_balance_fs(sbi); + return err; } |