[ENBD] Re: the files of ENBD

Peter T. Breuer ptb@it.uc3m.es
Mon, 23 Oct 2000 15:08:38 +0200 (MET DST)


"A month of sundays ago Wang Gang wrote:"
[Attachment, skipping...]

Wang's patches are now in the current snapshot of nbd-2.4.15, in
http://www.it.uc3m.es/ptb/nbd/src/.

They allow 

   1) for a "RAID mode" in which network errors are transmitted
      to the upper kernel layers instead of covered up internally.
      Load the module with "show_errs=1" as an option.
   2) Negotiation with the server over heartrate. This should
      be automatic. But there is a -p option to force it.

I also cleaned up the whole timeout mess following Wang's
identification of three major timeouts (data, pulse, negotiation).

I was sick of the single unix alarm timer so I implemented nested
timers.  It's not perfect since "the lowest level timer preempts all
others", not "the first due timer preempts all others", but the next
timer up will be consulted when the lower level one is rescinded, and
any pending timeout actioned.  The code paradigm is

      struct alarm alarm;
      if (catch_alarm(&alarm,timeout)) {
         ... handle timeout 
      } else {
         ... do work
         uncatch_alarm(&alarm);
      }

And that led to my first interaction with the new feature, just now: my
laptop timed out its nbd connect when I took it out of hibernation
after the train journey to work.

Grrrrrrrrr, euhhhhhh. If I simplified the timers so that they're more
inaccurate, that wouldn't happen. Or is there a way to access kernel
jiffies from userspace? I want jiffies, not real time.

I haven't released 2.4.15 because I haven't managed to do what I wanted
with it yet: modularize the kernel and net interfaces to the client
daemon so that I can swap them around. But I'm tempted to release it
as an interim.

Wang .. if you are listening, can you make a patch set for the current
nbd-2.2.29 code? It's in the httpd directory above. I'll drop in the
current kernel driver as is right now.

If you can, allow the client daemon to set the NBD_SHOW_ERRS flag
on individual devices via a new ioctl that the client calls when
the -e option is given on the command line.

T took me 2 days and nights to put in your work, Wang, so goodness
knows how long it took you!

Peter