On 10/25/2016 03:39 AM, Kevin Wolf wrote: >> It appears loop devices (with or without dm-crypt/LUKS) report a >> 255-sector maximum per request via the BLKSECTGET ioctl, which qemu >> rounds down to 64k in raw_refresh_limits().
Cool - I can make a loop device, so now I should have enough info to reproduce locally. I wonder if we should continue rounding down to a power of 2 (128 sectors), or if we should try to utilize the full 255 sector limit. But that's an independent patch and bigger audit, more along the lines of what we did for the weird scsi device with 15M limits. >> However this maximum >> appears to be just a hint: bdrv_driver_pwritev() succeeds even with a >> 385024-byte buffer of zeroes. > > I suppose what happens is that we get short writes, but the raw-posix > driver actually has the loop to deal with this, so eventually we return > with the whole thing written. > > Considering the presence of this loop, maybe we shouldn't set > bs->bl.max_transfer at all for raw-posix. Hm, except that for Linux AIO > we might actually need it. bdrv_aligned_preadv() fragments before calling into bdrv_driver_preadv(), but our write-zeroes fallback code is calling directly into bdrv_driver_preadv() rather than going through bdrv_aligned_preadv(); and I don't think we want to change that. In other words, it sounds like bdrv_co_do_pwrite_zeroes() has to do the same fragmentation that bdrv_aligned_preadv() would be doing. Okay, I think I know where to go with the patch, and hope to have something posted later today. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature