aboutsummaryrefslogtreecommitdiff
path: root/block/file-win32.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-04-07 17:32:59 +0200
committerKevin Wolf <kwolf@redhat.com>2023-04-11 16:39:01 +0200
commit8c6f27e7d85a794698eb1cd32c58df28cece50d1 (patch)
tree2986c8841fe3372fc56afd59b69344516aebedb0 /block/file-win32.c
parent439cc330c58c6973a5c73dab36c334e29607d47b (diff)
block: remove has_variable_length from BlockDriver
Fill in the field in BlockLimits directly for host devices, and copy it from there for the raw format. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20230407153303.391121-5-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/file-win32.c')
-rw-r--r--block/file-win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/file-win32.c b/block/file-win32.c
index c7d0b85306..1763b8662e 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -838,6 +838,7 @@ static void hdev_refresh_limits(BlockDriverState *bs, Error **errp)
{
/* XXX Does Windows support AIO on less than 512-byte alignment? */
bs->bl.request_alignment = 512;
+ bs->bl.has_variable_length = true;
}
static int hdev_open(BlockDriverState *bs, QDict *options, int flags,
@@ -933,7 +934,6 @@ static BlockDriver bdrv_host_device = {
.bdrv_attach_aio_context = raw_attach_aio_context,
.bdrv_co_getlength = raw_co_getlength,
- .has_variable_length = true,
.bdrv_co_get_allocated_file_size = raw_co_get_allocated_file_size,
};