diff mbox series

[RFC,v2,21/51] e2fsck: rbtree bitmap for dir

Message ID 1592494074-28991-22-git-send-email-wangshilong1991@gmail.com
State New
Headers show
Series introduce parallel fsck to e2fsck pass1 | expand

Commit Message

Wang Shilong June 18, 2020, 3:27 p.m. UTC
From: Li Xi <lixi@ddn.com>

Only rbtree supports merge, so use it for all bitmaps.

Change-Id: I863687ce275f9c891cd2d18c115cb75c6e24f4e4
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
 lib/ext2fs/gen_bitmap64.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 2617ac22..7bae443f 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -86,7 +86,6 @@  static void warn_bitmap(ext2fs_generic_bitmap_64 bitmap,
 #define INC_STAT(map, name) ;;
 #endif
 
-
 errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
 				    int type, __u64 start, __u64 end,
 				    __u64 real_end,
@@ -109,11 +108,7 @@  errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
 		ops = &ext2fs_blkmap64_rbtree;
 		break;
 	case EXT2FS_BMAP64_AUTODIR:
-		retval = ext2fs_get_num_dirs(fs, &num_dirs);
-		if (retval || num_dirs > (fs->super->s_inodes_count / 320))
-			ops = &ext2fs_blkmap64_bitarray;
-		else
-			ops = &ext2fs_blkmap64_rbtree;
+		ops = &ext2fs_blkmap64_rbtree;
 		break;
 	default:
 		return EINVAL;