aboutsummaryrefslogtreecommitdiff
path: root/block/qed-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qed-check.c')
-rw-r--r--block/qed-check.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/qed-check.c b/block/qed-check.c
index 622f308976..dcd4f036b8 100644
--- a/block/qed-check.c
+++ b/block/qed-check.c
@@ -234,8 +234,7 @@ int qed_check(BDRVQEDState *s, BdrvCheckResult *result, bool fix)
}
check.result->bfi.total_clusters =
- (s->header.image_size + s->header.cluster_size - 1) /
- s->header.cluster_size;
+ DIV_ROUND_UP(s->header.image_size, s->header.cluster_size);
ret = qed_check_l1_table(&check, s->l1_table);
if (ret == 0) {
/* Only check for leaks if entire image was scanned successfully */