• Kevin Wolf's avatar
    dma-helpers: Fix too long qiov · 58f423fb
    Kevin Wolf authored
    If the size of the scatter/gather list isn't a multiple of 512, the
    number of sectors for the block layer request is rounded down, resulting
    in a qiov that doesn't match the request length. Truncate the qiov to the
    new length of the request.
    This fixes the IDE qtest case /x86_64/ide/bmdma/short_prdt.
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
iov.c 15.1 KB