Skip to contentSkip to conversation

bcachefs: Convert open-coded extra computation to helper

PATCH New Alan Huang 1 participant 1 message Aug 10, 2024

lore
Share & tools
lore

Alan Huang

author
#0 lore raw

PATCH 1/1 bcachefs: Convert open-coded extra computation to helper

This patch replaces open-coded extra computation to eytzinger1_extra.

---
 fs/bcachefs/bset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/bset.c +1 -1
index b95deeb83071..e7c44f35f0c5 100644
@@ -733,7 +733,7 @@ static noinline void __build_ro_aux_tree(struct btree *b, struct bset_tree *t)
 		return;
 	}
 
-	t->extra = (t->size - rounddown_pow_of_two(t->size - 1)) << 1;
+	t->extra = eytzinger1_extra(t->size - 1);
 
 	/* First we figure out where the first key in each cacheline is */
 	eytzinger1_for_each(j, t->size - 1) {
Signature · 1 line
2.45.2