visual studio + oplocks

Nigel Williams nigel.williams at nomura.co.uk
Tue Nov 3 09:25:08 GMT 1998


Hi,

I wonder if anyone else has seen this problem with visual studio 5.0.sp3

We are running NT4.0 sp3 + some updates such as euro etc.

The problem is a bit of a surprise as it makes vc++ unusable on a samba
share with oplocks on. 
it is surprising because I have definitely used vc++ in this
configuration in the past.  I should mention
now that I have just come back from two weeks holiday,  we have just
moved the backend samba server to solaris 2.6
and I have just started using a new machine.  My old machine still works
but all the machines that I have tested 
with our standard build do not.  

It occurs with all versions of samba 1.9.18 from p3 which we use as
standard through to p10

If I try to close down vc++ after making some modifications to the
workspace (adding a file to a project).
vc ++ tries to update its on-disk config. and fails.  The following are
the operations I see in the log (minus a few getatrs).

In the following: vcb is ~vcb.tmp and mf.opt is the file mf.opt.

open vc68 new file readonly fnum 64
close 64
open vc69 new file readonly fnum 65
close 65
unlink vc68
find mf.opt
open vc68 new file writeable fnum 66
write 66
.........
write 66 ?
open vc68 readonly break our own oplock fnum 
break
open vc68 readonly completes fnum 67
read 67
................
close 67
close 66
unlink vc69
open mf.opt readonly fnum 68
read 68
...
mv mf.opt -> vc69 (NT redirector bug message. but succeeds)
close 68
unlink mf.opt (fails understandably)
open vc69 readonly fnum 69
read 69
....
mv vc69 -> mf.opt
unlink vc68
close 69
unlink vc69

There are no fail messages but the process appears to back out after the
rename of mf.opt -> ~vcc.tmp

Now the following is what happens when it works on my old PC which is
not our standard build
but NT4.0 sp3 with vc++ installed.  Note that this is from the same
share with oplocks still on.

open vcb readonly  new file fnum 96
close 96
open vcc readonly  new file fnum 97
close 97
unlink vcb
find mf.opt
open vcb writeable new file fnum 98
write 98
.............
unlink vcc
close 92
mv mf.opt -> vcc
getatr mf.opt
write 98
close 98
getatr mf.opt
mv vcb -> mf.opt
unlink vcc


This works fine and there are no oplocks on mf.opt when the rename to
~vc69.tmp.  
Also there are no re-reads of the files after they are written.


Can anyone suggest what can be causing this difference in behaviour.

Thanks 

Nigel Williams


More information about the samba-technical mailing list