diff --git a/lib/blobfs/tree.h b/lib/blobfs/tree.h index 2f9de1da11..ae42376294 100644 --- a/lib/blobfs/tree.h +++ b/lib/blobfs/tree.h @@ -44,13 +44,13 @@ struct cache_buffer { bool in_progress; }; -#define CACHE_BUFFER_SIZE (256 * 1024) #define CACHE_BUFFER_SHIFT (18) +#define CACHE_BUFFER_SIZE (1U << CACHE_BUFFER_SHIFT) #define NEXT_CACHE_BUFFER_OFFSET(offset) \ (((offset + CACHE_BUFFER_SIZE) >> CACHE_BUFFER_SHIFT) << CACHE_BUFFER_SHIFT) -#define CACHE_TREE_WIDTH 64 #define CACHE_TREE_SHIFT 6 +#define CACHE_TREE_WIDTH (1U << CACHE_TREE_SHIFT) #define CACHE_TREE_LEVEL_SHIFT(level) (CACHE_BUFFER_SHIFT + (level) * CACHE_TREE_SHIFT) #define CACHE_TREE_LEVEL_SIZE(level) (1ULL << CACHE_TREE_LEVEL_SHIFT(level)) #define CACHE_TREE_LEVEL_MASK(level) (CACHE_TREE_LEVEL_SIZE(level) - 1)