mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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:
parent
b444736346
commit
a9c49a6b02
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue