This version incorporates many of the changes suggested by Laszlo and Nir in their reviews (thanks).
We now require VDDK 6.5 because it turned out that 6.0 is broken. There is a reliable way to detect VDDK 6.0 by the absence of VixDiskLib_Wait, so we now give an accurate error message if someone tries to use libvixDiskLib.so.6 and it's < 6.5. Although the 5th patch is large, I didn't split it into two parts, because that's hard work. About checking the return value from pthread_mutex_init and pthread_cond_init. I checked the implementation of these (in the only implementation we really care about, glibc), and my reading is these cannot realistically fail, especially if the attr parameter is NULL. https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_mutex_init.c;h=bd998ba7853f9fb5a187fafbf9a566af3a76a79f;hb=HEAD#l50 https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_cond_init.c;h=b3fa66345a9461ccd665e16d6b29250bc6382a20;hb=HEAD#l26 cmd->error / cmd->completed have been combined into a single cmd->status enum. Laszlo raised a good point about abstraction (11c here: https://listman.redhat.com/archives/libguestfs/2021-October/msg00218.html) which I broadly agree with. I addressed it in a slightly different way. I think there was likely a problem with the old code in that it set cmd->error outside the mutex. I couldn't prove that this was definitely wrong, but it seemed either unsafe or a source of future problems. Instead the code now only updates the new cmd->status flag while holding the lock, which in turn solves the abstraction problem because there are now only a couple of places which update cmd->status. Rich. _______________________________________________ Libguestfs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/libguestfs
