Persistent locked files & Win95

Benjamin Scott bscott at hamptonsys.com
Fri Apr 9 13:31:29 GMT 1999


On Thu, 8 Apr 1999, Andrew Tridgell wrote:
>> I often find with Samba v2.0.3 that files accessed via Win95 (OSR2) stay 
>> locked forever after exiting the application that used them.
> 
> yes, that's right. This is how "oplocks" work,

>> Is there some Samba configuration I can tweak to have the locked files 
>> freed when accessed under Win95?
> 
> why do you want to do that? You can do it by setting "oplocks = no" in
> smb.conf but there will be a performance penalty.

  I do not know about the original poster, but here at Hampton Systems Group,
I have noticed a... not quite a bug... maybe a "conflict of interest", with
regards to oplocks.  I often edit Perl CGI scripts from my Win32 workstation.
The scripts themselves reside on our Linux server.  Since an oplock is opened
on those scripts by the Win32 client, the file is locked on the UNIX side,
preventing the script from running ("Text file busy").

  I work around this problem by using "veto oplock files", but I regard that
as inelegant.  I suspect, however, that the only way to implement a "proper"
solution would be to add special support for the concept of oplocks to the
Linux kernel.  File locking under UNIX is surprisingly primitive, given its
general superiority.

  Regards,

----------------------------------------------------------------------
Benjamin Scott <bscott at hamptonsys.com>          Phone: (603)431-7315
Hampton Systems Group, Inc.                     Fax  : (603)431-0822
http://www.hamptonsys.com                       DSN  : 852-3581
======================================================================





More information about the samba mailing list