提交 a9c49a6b 编写于 作者: K Kevin Wolf

qemu-io: Fix discard command

qemu-io passed bytes where it's supposed to pass sectors, so discard requests
were off.
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
上级 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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册