aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-io.c b/qemu-io.c
index 5b24c5eec2..4470e49bc8 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1465,7 +1465,7 @@ discard_f(int argc, char **argv)
}
gettimeofday(&t1, NULL);
- ret = bdrv_discard(bs, offset, count);
+ ret = bdrv_discard(bs, offset >> BDRV_SECTOR_BITS, count >> BDRV_SECTOR_BITS);
gettimeofday(&t2, NULL);
if (ret < 0) {