diff options
author | Peter Lieven <pl@kamp.de> | 2014-10-27 10:18:44 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-11-03 09:48:41 +0000 |
commit | 2647fab57d5d5e38b36f8dbda367d688045e6a2d (patch) | |
tree | afd4791ba0a632d13fcdbc3d9b2052990ebf0b3a /block.c | |
parent | ac3a8726644d4783eacf54212d23db01d1d30044 (diff) | |
download | qemu-2647fab57d5d5e38b36f8dbda367d688045e6a2d.tar.gz qemu-2647fab57d5d5e38b36f8dbda367d688045e6a2d.tar.bz2 qemu-2647fab57d5d5e38b36f8dbda367d688045e6a2d.zip |
BlockLimits: introduce max_transfer_length
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -519,6 +519,7 @@ void bdrv_refresh_limits(BlockDriverState *bs, Error **errp) return; } bs->bl.opt_transfer_length = bs->file->bl.opt_transfer_length; + bs->bl.max_transfer_length = bs->file->bl.max_transfer_length; bs->bl.opt_mem_alignment = bs->file->bl.opt_mem_alignment; } else { bs->bl.opt_mem_alignment = 512; @@ -533,6 +534,9 @@ void bdrv_refresh_limits(BlockDriverState *bs, Error **errp) bs->bl.opt_transfer_length = MAX(bs->bl.opt_transfer_length, bs->backing_hd->bl.opt_transfer_length); + bs->bl.max_transfer_length = + MIN_NON_ZERO(bs->bl.max_transfer_length, + bs->backing_hd->bl.max_transfer_length); bs->bl.opt_mem_alignment = MAX(bs->bl.opt_mem_alignment, bs->backing_hd->bl.opt_mem_alignment); |