]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block/blkio: Set BlockDriver::has_variable_length to false
authorAlberto Faria <afaria@redhat.com>
Tue, 8 Nov 2022 14:44:33 +0000 (14:44 +0000)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 Nov 2022 13:52:36 +0000 (14:52 +0100)
Setting it to true can cause the device size to be queried from libblkio
in otherwise fast paths, degrading performance. Set it to false and
require users to refresh the device size explicitly instead.

Fixes: 4c8f4fda0504 ("block/blkio: Tolerate device size changes")
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Alberto Faria <afaria@redhat.com>
Message-Id: <20221108144433.1334074-1-afaria@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/blkio.c

index 620fab28a7eab63dcec91b876391da2a39056dab..5eae3adfaf664932783089a9a9f141992f6d6ea8 100644 (file)
@@ -993,7 +993,6 @@ static void blkio_refresh_limits(BlockDriverState *bs, Error **errp)
     { \
         .format_name             = name, \
         .protocol_name           = name, \
-        .has_variable_length     = true, \
         .instance_size           = sizeof(BDRVBlkioState), \
         .bdrv_file_open          = blkio_file_open, \
         .bdrv_close              = blkio_close, \