On Wed, Sep 14, 2011 at 09:47:55AM +0200, Folkert van Heusden wrote: > Hi, > > I propose two new commands: > > - NBD_SERVER_INFO > which retrieves a textual description of the server it is connected > to. this then can for example contain information like buffer > settings, parameters, version of the software used, etc.
That sounds like something that could be done in the negotiation phase, during the option haggling. I don't think I'd like to see this afterwards. > - NBD_ELABORATE_ON_ERROR > if a command fails, an error code is returned. afaik this is an errno > value. sometimes you want to elaborate on this. for example a > server-device which detected that the datastructures got invalid or so > me return EINVALID (or whatever) and in response to this command a > textual description of what is wrong: "datastore corrupt, run fsck" Yes, there're definite problems with the current error handling. I didn't realize it at the time when I suggested it, but the absolute value of errno is very ill defined; POSIX only defines the symbolic names, nothing more, and on Linux the actual value can even be different from one architecture to another. I've been thinking of creating an NBD-specific list of error values, so that a client can have some more useful information. Adding textual info could also be an interesting idea, but the only problem I see with that is that it would entail a change of the protocol. Currently, an error returns only the nbd_reply data, nothing more; if we want to add textual data to that, it would require adding a length field, followed by an amount of textual data to the reply. This is doable, I suppose, but would change the protocol incompatibly. -- The volume of a pizza of thickness a and radius z can be described by the following formula: pi zz a ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
