PATCH: Re: op-lock weirdness with winXP and ntvfs_cifs

Amin Azez azez at ufomechanic.net
Fri Oct 19 11:27:34 GMT 2007


* Volker Lendecke wrote, On 18/10/07 21:02:
> On Thu, Oct 18, 2007 at 04:48:57PM +0100, Amin Azez wrote:
>
>   
>> I'll report back when I know more, but tips would be appreciated.
>>     
>
> First of all, please send sniffs.
>   
Generally, does sniffs mean "smbd -d5" type traces, showing hex packet
dumps?


I found the cause of the problem, opened files were not added to the
DLIST at cvfs_private->files, so the list of open files was always empty.

This patch fixes that and solves my problem. (I needed to re-write the
SETUP_FILE macro because I use it in other parts with my caching code.)

I guess there are implications for the test suite too, as far as oplock
tests, and tracking of open files? And closing non-existant files, I
guess file-close has been failing too (not finding the f).

Also, does cvfs_exit need to update this file list with closures?

We may want to review the DLIST_REMOVE use in cvfs_close in this patch,
I'm not sure if I should do it in the async callback instead of before.
I also don't know who should be free-ing the f and it's h, I suspect
they should be free'd here.

I haven't yet tracked down the ntvfs_handle creator for vfs_cifs, but a
cursory look suggests that the h is owned by the f, so free-ing the f
may be all that is required?


My symptoms didn't match the cause I reported because I was using a
double proxy layer and the back proxy didn't propagate the oplock break
to the front proxy where I was doing more active debugging so I thought
there were no oplock break occuring from 2003 server, when in fact Samba
was eating them.

Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file_dlist.patch
Type: text/x-patch
Size: 1846 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20071019/f8c10523/file_dlist.bin


More information about the samba-technical mailing list