[Libguestfs] [PATCH nbdkit] nbd: Update for libnbd 0.9.6.
Eric Blake
eblake at redhat.com
Tue Jul 30 17:27:08 UTC 2019
On 7/30/19 12:19 PM, Richard W.M. Jones wrote:
> ---
> configure.ac | 4 ++--
> plugins/nbd/nbd.c | 12 +++++++++---
> README | 2 +-
> 3 files changed, 12 insertions(+), 6 deletions(-)
>
> +++ b/plugins/nbd/nbd.c
> @@ -57,6 +57,7 @@
>
> /* The per-transaction details */
> struct transaction {
> + int64_t cookie;
Reinstating this, but only for...
> sem_t sem;
> uint32_t early_err;
> uint32_t err;
> @@ -353,15 +354,19 @@ nbdplug_prepare (struct transaction *trans)
> }
>
> static int
> -nbdplug_notify (unsigned valid_flag, void *opaque, int64_t cookie, int *error)
> +nbdplug_notify (unsigned valid_flag, void *opaque, int *error)
> {
> struct transaction *trans = opaque;
>
> if (!(valid_flag & LIBNBD_CALLBACK_VALID))
> return 0;
>
> + /* There's a possible race here where trans->cookie has not yet been
> + * updated by nbdplug_register, but it's only an informational
> + * message.
> + */
> nbdkit_debug ("cookie %" PRId64 " completed state machine, status %d",
> - cookie, *error);
> + trans->cookie, *error);
...debug purposes. It doesn't have to exist for actual behavior, but we
may find the debug messages worthwhile down the road, so the change
makes sense.
ACK; changes are correct. And hopefully we don't have very many more
API/ABI changes to deal with.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190730/c0286cf7/attachment.sig>
More information about the Libguestfs
mailing list