qemu-io: Fix discard command

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

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
Kevin Wolf 2011-01-26 16:56:34 +01:00
parent b444736346
commit a9c49a6b02

View File

@ -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) {