[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1586342714-12536-21-git-send-email-wangshilong1991@gmail.com>
Date: Wed, 8 Apr 2020 19:44:48 +0900
From: Wang Shilong <wangshilong1991@...il.com>
To: linux-ext4@...r.kernel.org
Cc: lixi@....com, adilger@...ger.ca, sihara@....com,
Wang Shilong <wshilong@....com>
Subject: [RFC PATCH 20/46] e2fsck: rbtree bitmap for dir
From: Li Xi <lixi@....com>
Only rbtree supports merge, so use it for all bitmaps.
Change-Id: I863687ce275f9c891cd2d18c115cb75c6e24f4e4
Signed-off-by: Li Xi <lixi@....com>
Signed-off-by: Wang Shilong <wshilong@....com>
---
lib/ext2fs/gen_bitmap64.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index ccba4427..78384e20 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;
--
2.25.2
Powered by blists - more mailing lists