[pve-devel] [PATCH] Fix/cleanup disk hotplug

Dietmar Maurer dietmar at proxmox.com
Thu Oct 13 07:49:25 CEST 2011


> About the recursive sub, do you prefer I simply make a "sleep X" to wait for
> device ?

no

> 
> I have add the recursive sub for wait as little as possible when we remove a
> device.
> (Sometime I can take 4-5 seconds on removal, depend on guest load)

recursive subroutines results in unnecessary stack grow, which we can avoid. 
I consider such construct dangerous.

Please use some kind of loop instead.

for (;;) {
 ...
 sleep(1):
}

- Dietmar


More information about the pve-devel mailing list