coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.78k stars 172 forks source link

torusblk.nbdserve: produce error when client doesn't specify volume name #313

Closed nak3 closed 8 years ago

nak3 commented 8 years ago

https://sourceforge.net/p/nbd/code/ci/master/tree/doc/proto.md

NBD_OPT_EXPORT_NAME (1)

...

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.

This is the only valid option in nonfixed newstyle negotiation. A server which wishes to use any other option MUST support fixed newstyle.

According to the specification, client may be able to use without specifying the volume name, however, torus doesn't have the "default" export. So, I think it should produces the error output as this patch.