blobfs, cache: Change some definition of macros
Some macros depend on others, so we change to change it and it will avoid potential wrong change only one value Change-Id: I2490064a19adc5cbd03a2c231d5f14fbf5b95792 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/372217 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
60c38d4022
commit
f352e6ab03
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user