mirror of https://gitee.com/openkylin/qemu.git
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 9a665b2b86
.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
afed260822
commit
5c916681ae
4
block.c
4
block.c
|
@ -2487,10 +2487,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);
|
||||
|
|
Loading…
Reference in New Issue