fnum chaining and pipes

Andrew Tridgell tridge at samba.anu.edu.au
Tue Aug 18 00:09:55 GMT 1998


> Actually, I just looked at the code in 1.9.18 and the reason
> it doesn't work in the head branch is your changes broke
> it :-) :-).

ahh well, I thought it working first time after those changes was too
good to be true :)

> Seriously, in 1.9.18 the chain_fnum is set just before
> 'chain_reply' is called - which means it is not in any
> danger in any of the oplock processing code. In the
> HEAD branch, however, the chain_fnum is set on the allocation
> of the new file, which means the oplock processing code
> can stomp on it.

It is set in allocation, yes, but it is also set in 
   file_fsp(char *buf,int where);

so, how are you getting the fsp pointer if it isn't via this routine?
There is no other fnum->fsp mapping routine in there.

hmmm, maybe what happens is that you push the 2nd half of a chained
OpenX+ReadX onto the queue but not the first? If you processed a ReadX
without having just processed the OpenX then that could indeed
stuffup.

> I've just checked in a fix for this, but I don't think
> I need to for the 1.9.18 branch.

I'm not totally convinced ... maybe I need more coffee.




More information about the samba-technical mailing list