Commit a9c49a6b authored by Kevin Wolf's avatar Kevin Wolf
Browse files

qemu-io: Fix discard command

qemu-io passed bytes where it's supposed to pass sectors, so discard requests
were off.

Signed-off-by: default avatarKevin Wolf <>
Reviewed-by: default avatarStefan Hajnoczi <>
parent b4447363
......@@ -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) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment