On 07/01/2014 10:52 AM, Eric Blake wrote: > On 07/01/2014 08:52 AM, Kevin Wolf wrote: >> When mirroring an image of a size that is not a multiple of the >> mirror job granularity, the last request would have the right nb_sectors >> argument, but a qiov that is rounded up to the next multiple of the >> granularity. Don't do this. >> >> This fixes a segfault that is caused by raw-posix being confused by this >> and allocating a buffer with request length, but operating on it with >> qiov length. >> >> Reported-by: Eric Blake >> Signed-off-by: Kevin Wolf >> --- >> block/mirror.c | 4 +++- >> tests/qemu-iotests/041 | 5 +++++ >> tests/qemu-iotests/041.out | 4 ++-- >> 3 files changed, 10 insertions(+), 3 deletions(-) >> > >> +++ b/tests/qemu-iotests/041 >> @@ -219,6 +219,11 @@ class TestSingleDriveZeroLength(TestSingleDrive): >> test_small_buffer2 = None >> test_large_cluster = None >> >> +class TestSingleDriverUnalignedLength(TestSingleDrive): > > s/Driver/Drive/ for consistency in the class name? > Other than that: Tested-by: Eric Blake Reviewed-by: Eric Blake -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org