/qemu/block/ |
H A D | cloop.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | bochs.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | dmg.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | iscsi.c | 95eaa785 Wed Sep 07 21:27:20 GMT 2016 Eric Blake <eblake@redhat.com> iscsi: Fix divide-by-zero regression on raw SG devices
When qemu uses iscsi devices in sg mode, iscsilun->block_size is left at 0. Prior to commits cf081fca and similar, when block limits were tracked in sectors, this did not matter: various block limits were just left at 0. But when we started scaling by block size, this caused SIGFPE.
Then, in a later patch, commit a5b8dd2c added an assertion to bdrv_open_common() that request_alignment is always non-zero; which was not true for SG mode. Rather than relax that assertion, we can just provide a sane value (we don't know of any SG device with a block size smaller than qemu's default sizing of 512 bytes).
One possible solution for SG mode is to just blindly skip ALL of iscsi_refresh_limits(), since we already short circuit so many other things in sg mode. But this patch takes a slightly more conservative approach, and merely guarantees that scaling will succeed, while still using multiples of the original size where possible. Resulting limits may still be zero in SG mode (that is, we mostly only fix block_size used as a denominator or which affect assertions, not all uses).
Reported-by: Holger Schranz <holger@fam-schranz.de> Signed-off-by: Eric Blake <eblake@redhat.com> CC: qemu-stable@nongnu.org
Message-Id: <1473283640-15756-1-git-send-email-eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | blkdebug.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | vvfat.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | io.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
H A D | qcow2.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
/qemu/include/block/ |
H A D | block_int.h | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
/qemu/ |
H A D | block.c | a5b8dd2c Thu Jun 23 22:37:24 GMT 2016 Eric Blake <eblake@redhat.com> block: Move request_alignment into BlockLimit
It makes more sense to have ALL block size limit constraints in the same struct. Improve the documentation while at it.
Simplify a couple of conditionals, now that we have audited and documented that request_alignment is always non-zero.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|