diff options
author | Kevin Wolf <kwolf@redhat.com> | 2024-04-12 16:42:02 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-04-16 11:50:52 +0100 |
commit | a12214d1c4204d2f51d8724993b8dfcf50dd7d94 (patch) | |
tree | db5ef3d8544321dfe1fd25f20071eae5f904bcc6 /hw/remote/mpqemu-link.c | |
parent | 0b96f75b71ef0a36f3e254545435a6cbcf4c8228 (diff) |
usb-storage: Fix BlockConf defaults
Commit 30896374 started to pass the full BlockConf from usb-storage to
scsi-disk, while previously only a few select properties would be
forwarded. This enables the user to set more properties, e.g. the block
size, that are actually taking effect.
However, now the calls to blkconf_apply_backend_options() and
blkconf_blocksizes() in usb_msd_storage_realize() that modify some of
these properties take effect, too, instead of being silently ignored.
This means at least that the block sizes get an unconditional default of
512 bytes before the configuration is passed to scsi-disk.
Before commit 30896374, the property wouldn't be set for scsi-disk and
therefore the device dependent defaults would apply - 512 for scsi-hd,
but 2048 for scsi-cd. The latter default has now become 512, too, which
makes at least Windows 11 installation fail when installing from
usb-storage.
Fix this by simply not calling these functions any more in usb-storage
and passing BlockConf on unmodified (except for the BlockBackend). The
same functions are called by the SCSI code anyway and it sets the right
defaults for the actual media type.
Fixes: 308963746169 ('scsi: Don't ignore most usb-storage properties')
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2260
Reported-by: Jonas Svensson
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Message-id: 20240412144202.13786-1-kwolf@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/remote/mpqemu-link.c')
0 files changed, 0 insertions, 0 deletions