diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-06-28 19:34:40 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-07-11 19:54:51 -0700 |
commit | 7f2ecdd837ae0a27149a0387b2534e11d955c5f8 (patch) | |
tree | 726673a06e25d7c029612370eeb4d5799776672c /fs/f2fs/node.c | |
parent | b4d0562137c9035becad5fc0588f6163aed916db (diff) | |
download | linux-rt-7f2ecdd837ae0a27149a0387b2534e11d955c5f8.tar.gz |
f2fs: flush journal nat entries for nat_bits during unmount
Let's flush journal nat entries for speed up in the next run.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 10643b11bd59..b0267d3823b4 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2582,6 +2582,13 @@ void f2fs_flush_nat_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc) nid_t set_idx = 0; LIST_HEAD(sets); + /* during unmount, let's flush nat_bits before checking dirty_nat_cnt */ + if (enabled_nat_bits(sbi, cpc)) { + down_write(&nm_i->nat_tree_lock); + remove_nats_in_journal(sbi); + up_write(&nm_i->nat_tree_lock); + } + if (!nm_i->dirty_nat_cnt) return; |