summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block_int.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/block_int.h b/block_int.h
index e3bfd192a2..b64a0095f5 100644
--- a/block_int.h
+++ b/block_int.h
@@ -224,7 +224,9 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
{
unsigned int exp = 0, size;
- for (size = conf->physical_block_size; size > 512; size >>= 1) {
+ for (size = conf->physical_block_size;
+ size > conf->logical_block_size;
+ size >>= 1) {
exp++;
}