[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v3 28/31] gendispatch: Introduce @sparseflag for our calls




On 05/16/2017 10:04 AM, Michal Privoznik wrote:
> Now, not all APIs are going to support sparse streams. To some it
> makes no sense at all, e.g. virDomainOpenConsole() or
> virDomainOpenChannel(). To others, we will need a special flag to
> indicate that client wants to enable sparse streams. Instead of
> having to write RPC dispatchers by hand we can just annotate in
> our .x files that a certain flag to certain RPC call enables this
> feature. For instance:
> 
>      /**
>       * @generate: both
>       * @readstream: 1
>       * @sparseflag: VIR_SPARSE_STREAM
>       * @acl: storage_vol:data_read
>       */
>      REMOTE_PROC_DOMAIN_SOME_API = XXX,
> 
> Therefore, whenever client calls virDomainSomeAPI(..,
> VIR_SPARSE_STREAM); daemon will mark that down and send stream
> skips when possible.
> 
> Signed-off-by: Michal Privoznik <mprivozn redhat com>
> ---
>  src/rpc/gendispatch.pl | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 

Still a bit of black magic to me ;-), but I see that it works...

Reviewed-by: John Ferlan <jferlan redhat com>

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]