From c4cc6dbe3659194c7103e7d536861cfd9cb52203 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Thu, 11 May 2023 23:26:29 -0700 Subject: [PATCH] sys/vfs/hammer2: Remove obsolete code/comment in freemap The code for this comment (freemap_radix) was removed in 93f3933ac3e2ad37a7ba775663c711b13588f147 in 2013. The #if0'd code right below this is unrelated code from different commit, and it also does not compile anymore. --- sys/vfs/hammer2/hammer2_freemap.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/sys/vfs/hammer2/hammer2_freemap.c b/sys/vfs/hammer2/hammer2_freemap.c index 38c538a8b0..842e41e43c 100644 --- a/sys/vfs/hammer2/hammer2_freemap.c +++ b/sys/vfs/hammer2/hammer2_freemap.c @@ -227,29 +227,6 @@ hammer2_freemap_alloc(hammer2_chain_t *chain, size_t bytes) KKASSERT(bytes >= HAMMER2_ALLOC_MIN && bytes <= HAMMER2_ALLOC_MAX); /* - * Calculate the starting point for our allocation search. - * - * Each freemap leaf is dedicated to a specific freemap_radix. - * The freemap_radix can be more fine-grained than the device buffer - * radix which results in inodes being grouped together in their - * own segment, terminal-data (16K or less) and initial indirect - * block being grouped together, and then full-indirect and full-data - * blocks (64K) being grouped together. - * - * The single most important aspect of this is the inode grouping - * because that is what allows 'find' and 'ls' and other filesystem - * topology operations to run fast. - */ -#if 0 - if (bref->data_off & ~HAMMER2_OFF_MASK_RADIX) - bpref = bref->data_off & ~HAMMER2_OFF_MASK_RADIX; - else if (trans->tmp_bpref) - bpref = trans->tmp_bpref; - else if (trans->tmp_ip) - bpref = trans->tmp_ip->chain->bref.data_off; - else -#endif - /* * Heuristic tracking index. We would like one for each distinct * bref type if possible. heur_freemap[] has room for two classes * for each type. At a minimum we have to break-up our heuristic -- 2.11.4.GIT