mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
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>
This commit is contained in:
committed by
Kevin Wolf
parent
439cc330c5
commit
8c6f27e7d8
@ -377,6 +377,8 @@ raw_co_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
|
||||
|
||||
static void raw_refresh_limits(BlockDriverState *bs, Error **errp)
|
||||
{
|
||||
bs->bl.has_variable_length = bs->file->bs->bl.has_variable_length;
|
||||
|
||||
if (bs->probed) {
|
||||
/* To make it easier to protect the first sector, any probed
|
||||
* image is restricted to read-modify-write on sub-sector
|
||||
@ -623,7 +625,6 @@ BlockDriver bdrv_raw = {
|
||||
.bdrv_co_truncate = &raw_co_truncate,
|
||||
.bdrv_co_getlength = &raw_co_getlength,
|
||||
.is_format = true,
|
||||
.has_variable_length = true,
|
||||
.bdrv_measure = &raw_measure,
|
||||
.bdrv_co_get_info = &raw_co_get_info,
|
||||
.bdrv_refresh_limits = &raw_refresh_limits,
|
||||
|
Reference in New Issue
Block a user