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

[Nbd] "list exports" implemented, request for review

Hi list,

I've just implemented a "list exports" command for nbd-client, which
allows clients to list available exports on a server. Usage:

wouter@...1104...:~/code/c/nbd$ cat /tmp/tmp.04gPZ0eJFQ/nbd.conf 
	allowlist = true
	exportname = /tmp/tmp.04gPZ0eJFQ/nbd.dd
	flush = true
	fua = true
	rotational = true
	filesize = 52428800
	temporary = true
wouter@...1104...:~/code/c/nbd$ ./nbd-server -C /tmp/tmp.04gPZ0eJFQ/nbd.conf 
wouter@...1104...:~/code/c/nbd$ ./nbd-client -l localhost
Negotiation: ..

The export is listed twice, because of the way we currently implement
IPv6 support. This may change in a future version, but not now.

I'd appreciate some review of this implementation, on two counts:
- First, I used this option as a way to change the protocol so that it's
  now future-compatible (if the server sees an option it doesn't
  understand, it will just say so, rather than close the connection). I
  *think* that should be enough to allow it to support future
  extensions, but I'd like to be sure.
- Second, I'd like to know from anyone if there's anything I overlooked
  in the implementation of this particular feature.


The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a

Reply to: