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

Peter T. Breuer enbd@lists.community.tummy.com
Sat, 26 Apr 2003 23:39:59 +0200 (MET DST)


"A month of sundays ago John Repass wrote:"
> Peter T. Breuer wrote:
> >Just make the change in the code I suggested. You pointed to a real
> >error.
> >
> Ok, sorry, I made the change and you were correct, that fixed the 
> problem.  I could have saved myself about 6 hours there if I were better 

I'm glad about that.  Logically it had to be that, since "adding a
response cache" to the server was the only thing I had done lately.  It
stands to reason that I made at least one mistake - returning error when
asking to remove from the cache something that was not in the cache
seems to have been it (fingers crossed).

If it affects speed, you can remove the calls data->lock_req and
data->unlock_req.  I don't know if it does.  The cache is notionally
ondisk (mmapped shared memory) so might conceivably have an effect on
something.

I implemented a zone-allocator to distribute the on-disk mmapped area
to the hashmap that holds the request responses. By a miracle it
appears to have no errors. I had to write a hashmap because gnu
gdbm manages simultaneous readers/writers via open and close calls
to get the lock - that's clearly too slow in this setting, a shared
memory hashmap. But I kept the same interface as gnu gdbm.


Would

   BUILD=/tmp/$(PACKAGE)/

satisfy you?

> Now I get to see what a 50gig raid1 looks like across the network...

Large and distant.


Peter