]> git.proxmox.com Git - mirror_qemu.git/commit
scsi-disk: Don't enlarge min_io_size to max_io_size
authorFam Zheng <famz@redhat.com>
Tue, 27 Mar 2018 16:41:41 +0000 (00:41 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Apr 2018 14:36:39 +0000 (16:36 +0200)
commit37c51741892a89cf5710f5ac231091fb0a6352c7
treee1e99894e34497941e19cc83f87d9c52d1aa10d4
parentdb1b5f135c58a1473b6609b53b8fd9da02d6b5d1
scsi-disk: Don't enlarge min_io_size to max_io_size

Some backends report big max_io_sectors. Making min_io_size the same
value in this case will make it impossible for guest to align memory,
therefore the disk may not be usable at all.

Do not enlarge them when they are zero.

Reported-by: David Gibson <dgibson@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180327164141.19075-1-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-disk.c