[ENBD] md5sum switch

Peter T. Breuer ptb at it.uc3m.es
Sat Jan 10 07:07:26 MST 2004


"Also sprach wiebalck at kip.uni-heidelberg.de:"
> Zitat von "Peter T. Breuer" <ptb at it.uc3m.es>:
> > What you want is for md5sum=0 to really turn off md5sums, but md5sum=1
> > to make it subject to the on_threshold and off_threshold as described?
> 
> This is exactly what I _thought_ how the sysctl variables would work ... seemed
> obvious to me :-)

The problem is that sysctl affects the whole driver, not just one
device. Therefore one cannot make its effect so powerful.

> > What should the ioctl do?
> 
> The ioctl is used by the client only, right? it enables md5 if the -m switch is
> given on the command line. why not laeve it like that? this way, the md5sum
> variable could be set by both (I think).

> To me it seems to be a good idea to switch md5 on by default (as it is now,
> since the summing starts if hitting the thresholds).
> Nonetheless, I would appreciate to have a way to switch it off once and for all
> :-). It makes no difference to me whether this happens on per device or on
> driver granularity, but currently I can only influence behaviour by playing
> around with the thresholds.

I think per device is where I should look first. It could be controlled by
/proc/nbdinfo. I need to distinguish between "I want md5sum" and
"md5sum is on" (or off). At the moment the md5summing is switched on or
off per device according to the global thresholds. I should make

   1) the thresholds hold "per device"
   2) introduce a way to switch on or off the ability to switch mdfsum
      on or off automatically, and do it per device.
   3) allow sysctl to do the trick

Can you look to see if there is any generic way of handling a vector of
variables in sysctl? I presume it is not obvious, or I would have done
it.

Peter


More information about the ENBD mailing list