[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in
From: |
Peter Lieven |
Subject: |
[Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight |
Date: |
Mon, 11 Mar 2013 11:05:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 |
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 <address@hidden>
---
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;
}
--
1.7.9.5
- [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight,
Peter Lieven <=
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Paolo Bonzini, 2013/03/11
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Peter Lieven, 2013/03/11
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Paolo Bonzini, 2013/03/11
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Peter Lieven, 2013/03/11
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Paolo Bonzini, 2013/03/11
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Kevin Wolf, 2013/03/13
- Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Paolo Bonzini, 2013/03/13
Re: [Qemu-devel] [PATCH 3/3] iscsi_truncate: ensure there are no requests in flight, Peter Lieven, 2013/03/19