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

View file

@ -2144,7 +2144,7 @@ int blk_truncate(BlockBackend *blk, int64_t offset, bool exact,
return -ENOMEDIUM;
}
return bdrv_truncate(blk->root, offset, exact, prealloc, errp);
return bdrv_truncate(blk->root, offset, exact, prealloc, 0, errp);
}
int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,