On 11.03.2013 11:16, Paolo Bonzini wrote:
Il 11/03/2013 11:05, Peter Lieven ha scritto:
ensure that there are no pending I/Os before calling
the sync readcapacity commands. the block_resize monitor
command will also flush all I/O, but double check in
case iscsi_truncate() is called from elsewhere in the
future.

Signed-off-by: Peter Lieven <p...@kamp.de>
---
  block/iscsi.c |    4 ++++
  1 file changed, 4 insertions(+)

diff --git a/block/iscsi.c b/block/iscsi.c
index 3d52921..de20d53 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1167,6 +1167,10 @@ static int iscsi_truncate(BlockDriverState *bs,
int64_t offset)
          return -ENOTSUP;
      }

+    /* ensure all async requests are completed before executing
+     * a sync readcapacity */
+    bdrv_drain_all();
+
      if ((ret = iscsi_readcapacity_sync(iscsilun)) != 0) {
          return ret;
      }

NACK to this patch.  It would be a bug, let's fix it properly.

The other two are fine, however.

Paolo, can you ensure that Patch 1+2 get merged before qemu 1.5.0
to fix the regression.

Thanks,
Peter



Paolo



Reply via email to