]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - include/linux/crush/crush.h
crush: fix tree node weight lookup
[mirror_ubuntu-jammy-kernel.git] / include / linux / crush / crush.h
index 158a4d25ca83f2f36dec50ba69e845f433385676..7c4750811b966e7d865484c2cf7020199c628164 100644 (file)
@@ -166,4 +166,9 @@ extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b);
 extern void crush_destroy_bucket(struct crush_bucket *b);
 extern void crush_destroy(struct crush_map *map);
 
+static inline int crush_calc_tree_node(int i)
+{
+       return ((i+1) << 1)-1;
+}
+
 #endif