main: Add option to disable SR advertisement
commit23c0186d1eb1cbb9ac1148372b19a692c15aabfc
authorEric Blake <eblake@redhat.com>
Mon, 19 Aug 2019 15:59:29 +0000 (19 10:59 -0500)
committerEric Blake <eblake@redhat.com>
Tue, 20 Aug 2019 21:38:19 +0000 (20 16:38 -0500)
tree53bc9e21a7a0d83709d27013e2db6a1848426b72
parentc23c83b64aa5ea6320bd9250f2fa0360d73477a8
main: Add option to disable SR advertisement

When we added support for .extents, we had nbdkit unconditionally
support structured replies if the client requests them, and the
plugin's .can_extents has no impact on what the server advertises.
However, while the plugin API doesn't care whether the client
requested SR, there are still integration situations where not
advertising SR can be useful (such as comparison on what a client does
with no block status vs. a block status that always reports
allocated).  We already have the command line options -o/-n for
tweaking core server functionality; add --no-sr to the mix.

In particular, doing this found that 'qemu-nbd --list' from qemu 4.2
is rather picky: it hangs up on a server that replies with
NBD_REP_ERR_POLICY, rather than silently proceeding without SR support
(at least libnbd is more tolerant).

Signed-off-by: Eric Blake <eblake@redhat.com>
docs/nbdkit-plugin.pod
docs/nbdkit-protocol.pod
docs/nbdkit.pod
docs/synopsis.txt
filters/noextents/nbdkit-noextents-filter.pod
server/internal.h
server/main.c
server/options.h
server/protocol-handshake-newstyle.c
tests/test-eflags.sh