On Fri, Oct 29, 2021 at 09:16:25AM -0500, Eric Blake wrote:
On Thu, Oct 28, 2021 at 03:24:29PM +0100, Richard W.M. Jones wrote:
> Since VDDK 6.0, asynchronous read and write operations are available.
> This commit makes use of these, allowing us to use the parallel thread
> model for increased performance.
>
> Note that at least VDDK 6.5 is required because VDDK 6.0 had a
> different and incompatible signature for VixDiskLibCompletionCB.
>
>
> +static int
> +vddk_can_fua (void *handle)
> +{
> + /* The Flush call was not available in VDDK < 6.0. */
> + return VixDiskLib_Flush != NULL ? NBDKIT_FUA_NATIVE : NBDKIT_FUA_NONE;
> +}
> +
> +static int
> +vddk_can_flush (void *handle)
> +{
> + /* The Flush call was not available in VDDK < 6.0. */
> + return VixDiskLib_Flush != NULL;
> +}
Since we now require 6.5, can we be sure VixDiskLib_Flush is non-NULL?
Yes, it was added in VDDK 6.0.
I think there are a few places in the code where we still have
conditionals like this that are always true.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org