|
| From: | Vladimir Sementsov-Ogievskiy |
| Subject: | Re: [PATCH v4 2/9] block: Add flags to bdrv(_co)_truncate() |
| Date: | Tue, 21 Apr 2020 11:25:37 +0300 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
20.04.2020 16:32, Kevin Wolf wrote:
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 <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
[..]
@@ -4169,7 +4170,7 @@ static int coroutine_fn
qcow2_co_truncate(BlockDriverState *bs, int64_t offset,
new_file_size = allocation_start +
nb_new_data_clusters * s->cluster_size;
/* Image file grows, so @exact does not matter */
- ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, errp);
+ ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, 0,
errp);
over-80 line
if (ret < 0) {
error_prepend(errp, "Failed to resize underlying file: ");
qcow2_free_clusters(bs, allocation_start,
@@ -4348,7 +4349,7 @@ qcow2_co_pwritev_compressed_part(BlockDriverState *bs,
if (len < 0) {
return len;
}
- return bdrv_co_truncate(bs->file, len, false, PREALLOC_MODE_OFF, NULL);
+ return bdrv_co_truncate(bs->file, len, false, PREALLOC_MODE_OFF, 0,
NULL);
and this one -- Best regards, Vladimir
| [Prev in Thread] | Current Thread | [Next in Thread] |