[Libguestfs] [nbdkit PATCH v2 6/6] multi-conn: Add knob to limit consistency emulation by export name

Eric Blake eblake at redhat.com
Thu Feb 25 22:12:13 UTC 2021


On 2/25/21 2:59 PM, Eric Blake wrote:
> We can't enable the knob by default since many nbdkit plugins don't
> care about export name, but it is certainly more efficient to limit
> consistency to just clients visiting the same export.  Thankfully,
> NBD_CMD_FLUSH does not take size and offset, and therefore is safe
> (although wasting CPU cycles) to use even when a different export has
> a different size.
> ---
>  .../multi-conn/nbdkit-multi-conn-filter.pod   | 29 +++++-
>  tests/Makefile.am                             |  2 +
>  filters/multi-conn/multi-conn.c               | 31 ++++++-
>  tests/test-multi-conn-name.sh                 | 88 +++++++++++++++++++
>  tests/test-multi-conn-plugin.sh               | 63 ++++++++-----
>  5 files changed, 186 insertions(+), 27 deletions(-)
>  create mode 100755 tests/test-multi-conn-name.sh

Hmm, I just realized I forgot to track which connections are dirty by
export name (so this ends up assuming connections are dirty when they
are not, and sending more flushes than necessary).  I'll see if I can
fix that.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list