diff options
| author | Kevin Wolf | 2011-01-26 16:56:34 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2011-01-31 10:03:00 +0100 |
| commit | a9c49a6b023fd3706002fd8d549c58f0343932f8 (patch) | |
| tree | efcc70b73937578fe9ad793631024229a2f0f5f6 | |
| parent | sheepdog: support creating images on remote hosts (diff) | |
| download | qemu-a9c49a6b023fd3706002fd8d549c58f0343932f8.tar.gz qemu-a9c49a6b023fd3706002fd8d549c58f0343932f8.tar.xz qemu-a9c49a6b023fd3706002fd8d549c58f0343932f8.zip | |
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>
| -rw-r--r-- | qemu-io.c | 2 |
1 files changed, 1 insertions, 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) { |
