aboutsummaryrefslogtreecommitdiff
path: root/block/blkdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blkdebug.c')
-rw-r--r--block/blkdebug.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index a9b03ff0a2..c19ab28f07 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -824,13 +824,7 @@ static int64_t blkdebug_getlength(BlockDriverState *bs)
static int blkdebug_truncate(BlockDriverState *bs, int64_t offset,
PreallocMode prealloc, Error **errp)
{
- if (prealloc != PREALLOC_MODE_OFF) {
- error_setg(errp, "Unsupported preallocation mode '%s'",
- PreallocMode_lookup[prealloc]);
- return -ENOTSUP;
- }
-
- return bdrv_truncate(bs->file, offset, errp);
+ return bdrv_truncate(bs->file, offset, prealloc, errp);
}
static void blkdebug_refresh_filename(BlockDriverState *bs, QDict *options)