On 08.06.2015 20:56, Dmitry Guryanov wrote: > On 06/05/2015 05:17 PM, Nikolay Shirokovskiy wrote: >> static int >> parallelsDoCmdRun(char **outbuf, const char *binary, va_list list) >> diff --git a/src/parallels/parallels_utils.h b/src/parallels/parallels_utils.h >> index 2d1d405..cdf6082 100644 >> --- a/src/parallels/parallels_utils.h >> +++ b/src/parallels/parallels_utils.h >> @@ -73,11 +73,22 @@ struct _parallelsConn { >> typedef struct _parallelsConn parallelsConn; >> typedef struct _parallelsConn *parallelsConnPtr; >> +struct _parallelsContersCache { > > Is it a typo? Why not counters? Of course typo ) > > >> + PRL_HANDLE stats; >> + virCond cond; >> + // -1 - unsubscribed >> + // > -1 - subscribed >> + int count; >> +}; >> + >> +typedef struct _parallelsContersCache parallelsContersCache; >> + >> struct parallelsDomObj { >> int id; >> char *uuid; >> char *home; >> PRL_HANDLE sdkdom; >> + parallelsContersCache cache; >> }; >> typedef struct parallelsDomObj *parallelsDomObjPtr; >> @@ -91,6 +102,7 @@ int parallelsNetworkClose(virConnectPtr conn); >> extern virNetworkDriver parallelsNetworkDriver; >> virDomainObjPtr parallelsDomObjFromDomain(virDomainPtr domain); >> +virDomainObjPtr parallelsDomObjFromDomainRef(virDomainPtr domain); >> virJSONValuePtr parallelsParseOutput(const char *binary, ...) >> ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL; >> @@ -106,4 +118,10 @@ virStorageVolPtr parallelsStorageVolLookupByPathLocked(virConnectPtr conn, >> int parallelsStorageVolDefRemove(virStoragePoolObjPtr privpool, >> virStorageVolDefPtr privvol); >> +#define PARALLELS_BLOCK_STATS_FOREACH(OP) \ >> + OP(rd_req, VIR_DOMAIN_BLOCK_STATS_READ_REQ, "read_requests") \ >> + OP(rd_bytes, VIR_DOMAIN_BLOCK_STATS_READ_BYTES, "read_total") \ >> + OP(wr_req, VIR_DOMAIN_BLOCK_STATS_WRITE_REQ, "write_requests") \ >> + OP(wr_bytes, VIR_DOMAIN_BLOCK_STATS_WRITE_BYTES, "write_total") >> + >> #endif > -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list