On 04/24/2018 12:15 PM, Kevin Wolf wrote: >>> Hm, this is kind of ugly. Previously, we handled everything byte-aligned >>> in the first section, now we mix both in the second section. >>> >>> I can see that you do this so you don't have to duplicate the acb and >>> coroutine yielding code below, but can we move things into the right >>> place in the final patch at least? That is, calculate sector_num and >>> nb_sectors only if all the byte-based interfaces weren't available. >> >> Yeah, that's easy enough to squash into patch 6: >>
> > Ah, yes. I thought of moving the code in the else block, but this works, > too. Maybe it's even a bit nicer. Moving the code into the 'if' works for bdrv_co_readv, but not so nicely for the bdrv_co_writev vs. bdrv_co_writev_flags. So for v2, I'll just hoist the aio code first; and I guess I smell another round of cleanups coming... -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
