Am 23.11.2017 um 18:31 hat Paolo Bonzini geschrieben: > On 23/11/2017 18:29, Kevin Wolf wrote: > >> Note that a similar issue exists in > >> blk_ioctl()/blk_ioctl_entry()/blk_prw() where blk_prw() always creates > >> the QEMUIOVector even if blk_ioctl()/blk_ioctl_entry() does not need a > >> QEMUIOVector. This will need to be fixed separately to keep it > >> consistent with the AIO path. > > > > I don't think there is an actual problem in the blk_ioctl() path because > > the iov on the stack stays valid as long as the coroutine runs. AIO is > > different because it returns before the coroutine has terminated. > > I agree, it's just code that is slightly ugly.
Slightly. Neither void pointers nor code duplication make it less ugly, though. So in this case, I'd say: If it ain't broke, don't fix it. Kevin