lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220423014216.34032-1-artem.blagodarenko@gmail.com>
Date:   Sat, 23 Apr 2022 01:42:16 +0000
From:   Artem Blagodarenko <artem.blagodarenko@...il.com>
To:     linux-ext4@...r.kernel.org
Cc:     adilger.kernel@...ger.ca,
        Artem Blagodarenko <artem.blagodarenko@....com>
Subject: [RFC] LUS-10810 e2fsck: use bitmaps for in-use block map

From: Artem Blagodarenko <artem.blagodarenko@....com>

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@....com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ