summaryrefslogtreecommitdiff
path: root/block/quorum.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2018-06-27 14:24:30 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-06-29 13:02:50 +0200
commit0a96ca2437646bad197b0108c5f4a93e7ead05a9 (patch)
tree55870f81c3c2329c66373bea713f2465cd141050 /block/quorum.c
parent2ad9b50f713053dcd6c44b2b5e3bbdb0cfe8a52d (diff)
downloadqemu-0a96ca2437646bad197b0108c5f4a93e7ead05a9.zip
hw/scsi: cleanups before VPD BL emulation
To add support for the emulation of Block Limits VPD page for passthrough devices, a few adjustments in the current code base is required to avoid repetition and improve clarity. In scsi-generic.c, detach the Inquiry handling from scsi_read_complete and put it into a new function called scsi_handle_inquiry_reply. This change aims to avoid cluttering of scsi_read_complete when we more logic in the Inquiry response handling is added in the next patches, centralizing the changes in the new function. In scsi-disk.c, take the build of all emulated VPD pages from scsi_disk_emulate_inquiry and make it available to other files into a non-static function called scsi_disk_emulate_vpd_page. Making it public will allow the future VPD BL emulation code for passthrough devices to use it from scsi-generic.c, avoiding copy/pasting this code solely for that purpose. It also has the advantage of providing emulation of all VPD pages in case we need to emulate other pages in other scenarios. As a bonus, scsi_disk_emulate_inquiry got tidier. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20180627172432.11120-2-danielhb413@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/quorum.c')
0 files changed, 0 insertions, 0 deletions