summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorYunlei He2017-03-13 13:22:18 +0100
committerJaegeuk Kim2017-03-25 08:19:37 +0100
commit59c9081bc86ef0b273a41abf2c1f413301429a6d (patch)
tree64297b01f018b2eff6ae04e6668a06e4eafcba97 /fs/f2fs/node.c
parentf2fs: don't reserve additional space in xattr block (diff)
downloadkernel-qcow2-linux-59c9081bc86ef0b273a41abf2c1f413301429a6d.tar.gz
kernel-qcow2-linux-59c9081bc86ef0b273a41abf2c1f413301429a6d.tar.xz
kernel-qcow2-linux-59c9081bc86ef0b273a41abf2c1f413301429a6d.zip
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 29dc996b573c..6e87178d34a2 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2448,10 +2448,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);
+ }
}
/*
@@ -2496,8 +2497,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)