[ENBD] enbd on amd 64

Peter T. Breuer ptb at inv.it.uc3m.es
Wed Mar 15 01:05:53 MST 2006


I've just brought up an amd64 machine (finally!) and got enbd to work
on it with a 64 bit userspace.

  % /tmp/enbd-test /dev/nda 
  /dev/nda has 4194304 bytes in 4096 blocks of 1024 bytes each
  flushing buffers..done
  writing....5%....10%....15%....20%....25%....30%....35%....40%....45%....50%....55%....60%....65%....70%....75%....80%....85%....90%....95%....done
  test 1 success:  0 incorrect blocks
  flushing buffers..done
  flushing buffers..done
  reading....5%....10%....15%....20%....25%....30%....35%....40%....45%....5
  ...

all OK, but I had to compile the enbd-client with -O0. 

   gcc version 3.3.5 (Debian 1:3.3.5-13)

When I used -O2 I got a weird segfault on return from a subroutine, and
other weirdnesses that vanished whenever I looked closer (the old "turn
on debugging options and the problem goes away"). No, not
initialization...  I suspect the problem is associated with the
compiler and/or what kind of addresses can be passed in ioctls to the
kernel - stack addresses seem to vanish in the call, heap addresses are
OK.  There may be some inappropriate optimization happening.  The
kernel seems to have a "compatibility layer" for ioctls.  If anyone
knows anything about such issues, please tell me.


Peter


More information about the ENBD mailing list