virtio-blk: Consider virtio_max_dma_size() for maximum segment size
authorJoerg Roedel <jroedel@suse.de>
Thu, 7 Feb 2019 11:59:17 +0000 (12:59 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 6 Mar 2019 16:19:26 +0000 (11:19 -0500)
commitfd1068e1860e44aaaa337b516df4518d1ce98da1
tree538c2b98b0a1d0c0841e6be1b5b1085965a25d2e
parente6d6dd6c875eb3c9b69bb640419405726e6e0bbe
virtio-blk: Consider virtio_max_dma_size() for maximum segment size

Segments can't be larger than the maximum DMA mapping size
supported on the platform. Take that into account when
setting the maximum segment size for a block device.

Cc: stable@vger.kernel.org
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/block/virtio_blk.c