On 5/7/20 6:23 AM, Richard W.M. Jones wrote:
In can_extents we test whether the VDDK function
VixDiskLib_QueryAllocatedBlocks works before declaring that extents
are supported. This VDDK function can fail in several ways but most
notable if the server doesn't support querying extents.
In this case VDDK raises an error message through the error_function
callback, which we turn into a call to nbdkit_error. In most cases
this will cause something to be printed to stderr and/or logged
noisily to syslog, which is not desirable.
This commit adds a per-thread error suppression mechanism so that we
can temporarily hide errors, especially while doing this test, but I
guess it might be useful in future in other cases too.
Note this only affects a narrow range of versions of VMware ESXi and
VDDK. In particular to see this problem you would need
VMware ESXi (server) <= 5.5 and VDDK (client) >= 6.7.
---
plugins/vddk/vddk.c | 80 ++++++++++++++++++++++++++++++++++++---------
1 file changed, 64 insertions(+), 16 deletions(-)
ACK.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org