f2fs: check all ones or zeros bitmap with bitops for better mount performance
authorChao Yu <chao2.yu@samsung.com>
Tue, 29 Oct 2013 06:50:40 +0000 (14:50 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Wed, 30 Oct 2013 03:23:23 +0000 (12:23 +0900)
commit44c60bf2b9f2808e127fa4cd3b11b50a46cf5817
tree6fb81655c3600cbf9e73fb07e19340c53ac47a1d
parent9a47938b226cc2b8e2afd72b0f1ca1a7e1367cf5
f2fs: check all ones or zeros bitmap with bitops for better mount performance

Previously, check_block_count check valid_map with bit data type in common
scenario that sit has all ones or zeros bitmap, it makes low mount performance.
So let's check the special bitmap with integer data type instead of the bit one.

v1-->v2:
 o use find_next_{zero_}bit_le for better performance and readable as Jaegeuk
   suggested.
 o use neat logogram in comment as Gu Zheng suggested.
 o search continuous ones or zeros for better performance when checking mixed
   bitmap.

Suggested-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Signed-off-by: Shu Tan <shu.tan@samsung.com>
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/segment.h