Hi Juan, On 20-05-13 14:16, Juan Antonio Martinez wrote: [...snip problem statement...] > So my question: > Is there any way to get nbd kernel module waiting for server client > execute finnish_sock() routine to tell the new socket to talk to, > instead of inmediate return of ioerror ?
This was originally implemented after a short (off-list?) discussion between Paul and myself. At the time, the plan was that the kernel module would block all access to the device until the active nbd-client process would exit. The client process could then either reconnect and hand back a socket (in which case we're in persist mode and we continue as before) or just exit (and then any further reads start failing). I think this is a fairly clean interface. I don't think we tested this much, however, and it may be that it doesn't work as advertised. > Perhaps a new ioctl() or nbd_flag option to say kernel that client is in > "persist mode" and wait instead of return? I suppose that could work, but I don't think it's required; all the kernel needs to do is wait for userspace to give up or return. After all, a reconnect might always fail for one reason or another, in which case userspace might decide that disconnecting is the right thing to do, now. If we're waiting because the kernel thinks we're in "persist mode", this isn't very helpful. Regards, -- This end should point toward the ground if you want to go to space. If it starts pointing toward space you are having a bad problem and you will not go to space today. -- http://xkcd.com/1133/ ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
