[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/28] qemu-io: Fix discard command
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 13/28] qemu-io: Fix discard command |
Date: |
Mon, 31 Jan 2011 16:29:01 +0100 |
qemu-io passed bytes where it's supposed to pass sectors, so discard requests
were off.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
qemu-io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-io.c b/qemu-io.c
index 5b24c5e..4470e49 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -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) {
--
1.7.2.3
- [Qemu-devel] [PATCH 14/28] qcow2: Add bdrv_discard support, (continued)
- [Qemu-devel] [PATCH 14/28] qcow2: Add bdrv_discard support, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 17/28] scsi hotplug: Set DriveInfo member bus correctly, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 16/28] raw-win32: Fix bdrv_flush return value, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 24/28] blockdev: Factor drive_index_to_{bus, unit}_id out of drive_init(), Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 27/28] blockdev: Replace drive_add()'s fmt, ... by optstr parameter, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 25/28] blockdev: New drive_get_by_index(), Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 28/28] blockdev: Fix drive_add for drives without media, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 19/28] blockdev: New drive_get_next(), replacing qdev_init_bdrv(), Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 06/28] block: tell drivers about an image resize, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 21/28] blockdev: Put BlockInterfaceType names and max_devs in tables, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 13/28] qemu-io: Fix discard command,
Kevin Wolf <=
- [Qemu-devel] [PATCH 23/28] blockdev: Make drive_add() take explicit type, index parameters, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 20/28] blockdev: Move BlockInterfaceType from qemu-common.h to blockdev.h, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 09/28] Add documentation for STRTOSZ_DEFSUFFIX_ macros, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 26/28] blockdev: Reject multiple definitions for the same drive, Kevin Wolf, 2011/01/31
- [Qemu-devel] [PATCH 22/28] blockdev: Fix regression in -drive if=scsi, index=N, Kevin Wolf, 2011/01/31
- [Qemu-devel] Re: [PULL 00/28] Block patches, Anthony Liguori, 2011/01/31