On 11/10/2016 02:03 AM, Kevin Wolf wrote: >>>>> Test case: >>>>> >>>>> $ qemu-img create -f qcow2 -o cluster_size=1M file 10M >>>>> $ losetup /dev/loop2 /path/to/file >>>>> $ qemu-io -f qcow2 /dev/loop2 >>>>> qemu-io> w 7m 1k >>>>> qemu-io> w -z 8003584 2093056 >>>> >>>> Please include a qemu-iotests test case to protect against regressions. >>> >>> None of the existing qemu-iotests use losetup; I guess the closest thing >>> to do is crib from a test that uses passwordless sudo? >>> >>> It will certainly be a separate commit, but I'll give it my best shot to >>> post something soon. >> >> Alternatively, maybe add a blkdebug option to emulate a small max_transfer at >> the protocol layer? > > This sounds like the better option indeed.
I'm working on this, but found that blkdebug doesn't yet support discard or write zero. While I do plan on adding that support, it is a new feature to blkdebug, and therefore probably belongs in 2.9. That said, I'm still hoping to post an entire series with improved blkdebug and qemu-iotest coverage of the two tangentially related patches (this one for write zeroes, and another for discard support), where we can pick the first half of the series (basically v2 of my pending patches) into 2.8 while feeling more confident that the second half (the blkdebug and testsuite additions) wait for 2.9. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
