提交 e4cce2d3 编写于 作者: P Peter Lieven 提交者: Michael Roth

Revert "block: complete all IOs before .bdrv_truncate"

brdv_truncate() is also called from readv/writev commands on self-
growing file based storage. this will result in requests waiting
for theirselves to complete.

This reverts commit 9a665b2b.
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
(cherry picked from commit 5c916681)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 d15b1aa3
......@@ -2427,10 +2427,6 @@ int bdrv_truncate(BlockDriverState *bs, int64_t offset)
return -EACCES;
if (bdrv_in_use(bs))
return -EBUSY;
/* There better not be any in-flight IOs when we truncate the device. */
bdrv_drain_all();
ret = drv->bdrv_truncate(bs, offset);
if (ret == 0) {
ret = refresh_total_sectors(bs, offset >> BDRV_SECTOR_BITS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册