While benchmarking nbd-server vs. nbdkit on an underlying raw block device, I encountered multiple bugs. One directly in nbd-server (I'm proposing a patch there soon): block device size is advertised to NBD_OPT_INFO as 0, because it was relying on just stat() data rather than lseek(SEEK_END) the way it does for NBD_OPT_GO. Another two issues in libnbd: we were failing to handle errors in nbd_can_meta_context() correctly which resulted in nbdcopy refusing to work with nbd-server 3.25, plus the fact that we were failing nbd_can_meta_context() in the first place. But getting the testsuite to show the broken behavior was easier when I first patched nbdkit to have the option to behave more like nbd-server (patch for that just sent). Eric Blake (3): copy, info: Treat can_meta_context failures as unsupported api: Fix nbd_can_meta_context for server that lacks meta contexts copy: Add test for server without meta context support generator/states-newstyle-opt-meta-context.c | 2 ++ copy/copy-nbd-error.sh | 10 +++++++++- copy/nbd-ops.c | 2 +- info/map.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) -- 2.43.2