[Libguestfs] [PATCH nbdkit 6/9] nbd: Don't cache nbd_aio_get_fd in the handle.
Eric Blake
eblake at redhat.com
Mon Jul 6 19:37:52 UTC 2020
On 7/1/20 2:17 AM, Richard W.M. Jones wrote:
> It's not necessary to cache this, and the libnbd API doesn't guarantee
> that it always stays the same.
But should the libnbd API guarantee it? Then again, looking at the
various examples in libnbd itself, I do see that they all check
nbd_aio_get_fd() frequently, rather than caching it; and
glib-main-loop.c even mentions:
/* The poll file descriptor can change or become invalid at any
* time.
Okay, this change makes sense.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list