block: Add flags to bdrv(_co)_truncate()

Now that block drivers can support flags for .bdrv_co_truncate, expose
the parameter in the node level interfaces bdrv_co_truncate() and
bdrv_truncate().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200424125448.63318-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf
2020-04-24 14:54:40 +02:00
parent 92b92799dc
commit 7b8e485742
13 changed files with 34 additions and 28 deletions
+1 -1
View File
@@ -558,7 +558,7 @@ static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s,
goto exit;
}
ret = bdrv_truncate(bs->file, new_file_size, false,
PREALLOC_MODE_OFF, NULL);
PREALLOC_MODE_OFF, 0, NULL);
if (ret < 0) {
goto exit;
}