[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [Qemu-devel] [PULL 23/28] nbd: always query export list in fixed new style protocol



On Tue, May 17, 2016 at 04:22:06PM +0100, Alex Bligh wrote:
> nbdkit is non-compliant in that case. Support of NBD_OPT_LIST is
> compulsory, even if you support it by returning a nameless export
> (or default). Moreover support of export names is compulsory
> (even if you have a single fixed one called "" or "default").

The protocol doc doesn't mention "default" (assuming you mean that
literal string).  It says:

  A special, "empty", name (i.e., the length field is zero and no name
  is specified), is reserved for a "default" export, to be used in
  cases where explicitly specifying an export name makes no sense.

which seems to indicate only the empty string should be used for this
case.

Unfortunately qemu 2.5 (as a client) treated exportname == "" as
meaning that the old-style protocol should be used.  This is at least
fixed in qemu 2.6, so nbdkit could now answer NBD_OPT_LIST with a
single empty string, although we lose backwards compatibility with
qemu 2.5.

> Whilst that is fair enough, NBD_OPT_LIST is a mandatory part of the
> specification. If a server doesn't implement mandatory parts of
> the specification, then bad things will happen.

It implements it, it's just that there wasn't a way to implement
anything other than returning an error since we accept anything as an
export name.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html



Reply to: