On 06/15/2018 04:18 AM, Michal Privoznik wrote: > The aim of this API is to allow the caller do best effort. Some s/do/to do/ > functions can work even when acquiring the job fails (e.g. > qemuConnectGetAllDomainStats()). But what they can't bear is > delay if they have to wait up to 30 seconds for each domain that > is processing some other job. > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > src/qemu/qemu_domain.c | 43 ++++++++++++++++++++++++++++++++++++++----- > src/qemu/qemu_domain.h | 4 ++++ > 2 files changed, 42 insertions(+), 5 deletions(-) > Couple of nits noted, one above, one below... Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx> John > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index 21d54938b6..a01067049e 100644 > --- a/src/qemu/qemu_domain.c > +++ b/src/qemu/qemu_domain.c > @@ -6359,11 +6359,15 @@ qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv, qemuDomainJob job) > * @obj: domain object > * @job: qemuDomainJob to start > * @asyncJob: qemuDomainAsyncJob to start > + * @nowait: don't wait trying to acquire @job > * > * Acquires job for a domain object which must be locked before > * calling. If there's already a job running waits up to > * QEMU_JOB_WAIT_TIME after which the functions fails reporting > - * an error. > + * an error unless @nowait is set. Paragraph break have a empty line for readability. > + * If @nowait is true this function tries to acquire job and if > + * it fails, then it returns immediately without waiting. No > + * error is reported in this case. > * > * Returns: 0 on success, > * -2 if unable to start job because of timeout or [...] -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list