Took a quick look at libvirt's code, it seems not to create a thread
for this, and in virsh.c,line 6306:
static bool
cmdPoolRefresh(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool;
bool ret = true;
const char *name;
if (!vshConnectionUsability(ctl, ctl->conn))
return false;
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
if (virStoragePoolRefresh(pool, 0) == 0) {
vshPrint(ctl, _("Pool %s refreshed\n"), name);
} else {
vshError(ctl, _("Failed to refresh pool %s"), name);
ret = false;
}
virStoragePoolFree(pool);
return ret;
}
this showed the calling of this API have just 2 result: succeed or
fail, so I think it is synchronize calling.
于 2011-8-12 2:55, Gareth S Bestor 写道:
Basically, when you call virStoragePoolRefresh(), eg to pickup any new
disks that may have just been created under the pool path, when the API
returns are you guaranteed that the refresh operation is completed, or
might the pool still be refreshing itself? I ask because I understand
this refresh operation can be 'expensive', so I'm wondering if in fact
things may still be going on in the background after the API returns...
- Gareth
Dr. Gareth S. Bestor
IBM Senior Software Engineer
Systems & Technology Group - Systems Management Standards
971-285-6375 (mobile)
bestor(a)us.ibm.com
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Best Regards
Wayne Xia
mail:xiawenc@linux.vnet.ibm.com
tel:86-010-82450803