[ENBD] can't write to nb device - nbd_get_req blocking req

Peter T. Breuer enbd@lists.community.tummy.com
Fri, 25 Apr 2003 21:55:19 +0200 (MET DST)


"A month of sundays ago John Repass wrote:"
> I was testing to localhost yesterday because I was trying to rule out a network problem.  

That's OK.

> Then I started the server and client on the same machines like this:
> enbd-server 1111 -t 120 -b 1024 -0 -w 10000 -i john /dev/hda8 (on the server machine, poppy)

You might want to run with -w 0. Though I think that's the default.

> enbd-client poppy 1111 -n 4 -b 1024 -i john -t 120 -p 5 -d 1 /dev/nda (on the client where I had just run make test)
> 
> I used the same options as the clients started by make test.
> 
> Then just for the heck of it, before trying anything with nda I ran enbd-test /dev/ndb, which was still up from make test, and everything passed.  Then I tried enbd-test /dev/nda, which is the client that I started, and it froze after the second "flushing buffers.." again.  I get a similar result trying to make a filesystem.
> 
> Seems like an obvious case of user error, but I can't figure out what I'm doing wrong...

Just make the change in the code I suggested. You pointed to a real
error.

> I haven't made the change to shmem.c that you suggested yesterday yet, because I thought I was probably doing something to cause the errors...  still do, but I'm not sure what.

Well, I think you should make the code change. After all, it was what
the log showed up! Either make the code in shmem.c return 0 when it
notices it's trying  to unlock a request that is no longer in cache, or
kill the calls in enbd-server.c to data->lock_req and data->unlock_req,
replaceing them by err=0;.

> Anyway, I'll try that now.  

OK!

Peter