diff options
Diffstat (limited to 'block/raw-format.c')
-rw-r--r-- | block/raw-format.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/raw-format.c b/block/raw-format.c index 721c9a025b..142649ed56 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -357,12 +357,6 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset, { BDRVRawState *s = bs->opaque; - if (prealloc != PREALLOC_MODE_OFF) { - error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); - return -ENOTSUP; - } - if (s->has_size) { error_setg(errp, "Cannot resize fixed-size raw disks"); return -ENOTSUP; @@ -375,7 +369,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset, s->size = offset; offset += s->offset; - return bdrv_truncate(bs->file, offset, errp); + return bdrv_truncate(bs->file, offset, prealloc, errp); } static int raw_media_changed(BlockDriverState *bs) |