Il 29/07/2013 15:21, Kevin Wolf ha scritto: > Am 25.07.2013 um 16:23 hat Paolo Bonzini geschrieben: >> bdrv_is_allocated can detect coroutine context and go through a fast >> path, similar to other block layer functions. >> >> Reviewed-by: Eric Blake <ebl...@redhat.com> >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > > It can, but why is this a good idea?
What exactly? Dropping bdrv_co_is_allocated from the public API, or not creating always a new coroutine while still dropping bdrv_co_is_allocated? In the end, the answer is simply for consistency. bdrv_co_is_allocated is different from all other APIs in this respect, and I didn't want to choose between making get_block_status the same as is_allocated vs. the same as everything else. > Charlie is working in exactly the opposite direction, namely splitting > the existing functions in a coroutine-only and a synchronous-only part. > We should be clear what we really want here. That's fine---but whatever we do we should do it for all APIs. So this patch is just making things consistent before adding another API. Paolo