[Nbd] "list exports" implemented, request for review
- To: nbd-general@...72...
- Subject: [Nbd] "list exports" implemented, request for review
- From: Wouter Verhelst <w@...112...>
- Date: Sat, 5 May 2012 11:27:48 +0200
- Message-id: <20120505092748.GA17008@...3...>
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
[generic]
allowlist = true
[export1]
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: ..
export1
export1
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.
Thanks,
--
The volume of a pizza of thickness a and radius z can be described by
the following formula:
pi zz a
Reply to: