diff options
| author | Yunlei He <heyunlei@huawei.com> | 2017-03-13 20:22:18 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:39:21 +0200 |
| commit | 354f62908d55274175e7fe8c32db2cd17110bbc9 (patch) | |
| tree | 63f43ae17dc34ab6ab37825b20937bbf4ec2d27b /fs/f2fs/node.c | |
| parent | 047901c9891423930810e2cb5d6cb1c0e1c04354 (diff) | |
f2fs: allow write page cache when writting cp
This patch allow write data to normal file when writting
new checkpoint.
We relax three limitations for write_begin path:
1. data allocation
2. node allocation
3. variables in checkpoint
Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
| -rw-r--r-- | fs/f2fs/node.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index cd9529467..3c4564cca 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2468,10 +2468,11 @@ static void __flush_nat_entry_set(struct f2fs_sb_info *sbi, f2fs_put_page(page, 1); } - f2fs_bug_on(sbi, set->entry_cnt); - - radix_tree_delete(&NM_I(sbi)->nat_set_root, set->set); - kmem_cache_free(nat_entry_set_slab, set); + /* Allow dirty nats by node block allocation in write_begin */ + if (!set->entry_cnt) { + radix_tree_delete(&NM_I(sbi)->nat_set_root, set->set); + kmem_cache_free(nat_entry_set_slab, set); + } } /* @@ -2516,8 +2517,7 @@ void flush_nat_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc) __flush_nat_entry_set(sbi, set, cpc); up_write(&nm_i->nat_tree_lock); - - f2fs_bug_on(sbi, nm_i->dirty_nat_cnt); + /* Allow dirty nats by node block allocation in write_begin */ } static int __get_nat_bitmaps(struct f2fs_sb_info *sbi) |
