Commit 6bfaf7b1 authored by Hou Pengyang's avatar Hou Pengyang Committed by Jaegeuk Kim

f2fs: remove unsafe bitmap checking

proc A:                      proc B:
- writeback_sb_inodes
- __writeback_single_inode
- do_writepages
- f2fs_write_node_pages
- f2fs_balance_fs_bg         - write_checkpoint
- build_free_nids            - flush_nat_entries
- __build_free_nids          - __flush_nat_entry_set
- ra_meta_pages              - get_next_nat_page
- current_nat_addr           - set_to_next_nat
[do nat_bitmap checking]     - f2fs_change_bit

For proc A, nat_bitmap and nat_bitmap_mir would be compared without lock_op and
nm_i->nat_tree_lock, while proc B is changing nat_bitmap/nat_bitmap_ver in cp.

So it is normal for nat_bitmap/nat_bitmap diffrence under such scenario.

This patch fix this by removing the monitoring point.

[Fix: 599a09b2 f2fs: check in-memory nat version bitmap]
Signed-off-by: default avatarHou Pengyang <houpengyang@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent e15882b6
...@@ -209,12 +209,6 @@ static inline pgoff_t current_nat_addr(struct f2fs_sb_info *sbi, nid_t start) ...@@ -209,12 +209,6 @@ static inline pgoff_t current_nat_addr(struct f2fs_sb_info *sbi, nid_t start)
(seg_off << sbi->log_blocks_per_seg << 1) + (seg_off << sbi->log_blocks_per_seg << 1) +
(block_off & (sbi->blocks_per_seg - 1))); (block_off & (sbi->blocks_per_seg - 1)));
#ifdef CONFIG_F2FS_CHECK_FS
if (f2fs_test_bit(block_off, nm_i->nat_bitmap) !=
f2fs_test_bit(block_off, nm_i->nat_bitmap_mir))
f2fs_bug_on(sbi, 1);
#endif
if (f2fs_test_bit(block_off, nm_i->nat_bitmap)) if (f2fs_test_bit(block_off, nm_i->nat_bitmap))
block_addr += sbi->blocks_per_seg; block_addr += sbi->blocks_per_seg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment