From: Artem Blagodarenko <artem.blagodarenko@xxxxxxx> EXT2FS_BMAP64_RBTREE is too expensive for fragmented prtition, that can lead to situation than e2fsck use swapfile. This patch change EXT2FS_BMAP64_RBTREE to bimap. Marked as RFC because it must be descussed whether this flags should be changed by default or some additional option or a heuristic is needed to contol this flags. signed-off-by: Artem Blagodarenko <artem.blagodarenko@xxxxxxx> Change-Id: I6a906b5e54cf40eaba82624d8e4c2b0f90132813 --- e2fsck/pass1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 26b9ab71..563dcdc5 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -1247,7 +1247,7 @@ void e2fsck_pass1(e2fsck_t ctx) return; } pctx.errcode = e2fsck_allocate_subcluster_bitmap(fs, - _("in-use block map"), EXT2FS_BMAP64_RBTREE, + _("in-use block map"), EXT2FS_BMAP64_BITARRAY, "block_found_map", &ctx->block_found_map); if (pctx.errcode) { pctx.num = 1; @@ -1256,7 +1256,7 @@ void e2fsck_pass1(e2fsck_t ctx) return; } pctx.errcode = e2fsck_allocate_block_bitmap(fs, - _("metadata block map"), EXT2FS_BMAP64_RBTREE, + _("metadata block map"), EXT2FS_BMAP64_BITARRAY, "block_metadata_map", &ctx->block_metadata_map); if (pctx.errcode) { pctx.num = 1; @@ -2456,7 +2456,7 @@ static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx, if (!ctx->block_ea_map) { pctx->errcode = e2fsck_allocate_block_bitmap(fs, _("ext attr block map"), - EXT2FS_BMAP64_RBTREE, "block_ea_map", + EXT2FS_BMAP64_BITARRAY, "block_ea_map", &ctx->block_ea_map); if (pctx->errcode) { pctx->num = 2; -- 2.27.0