fcntl cooperation with server side processes
cmg at dok.org
Wed Jul 21 14:27:45 GMT 2004
Jeremy Allison <jra at samba.org> writes:
> Share modes are not file locks. Don't confuse the two. Share modes have
> no meaning to POSIX apps and they ignore them.
OK, that was me grabbing at straws.
> If you want to coordinate between Windows and Linux apps make sure
> the Windows apps don't ask for oplocks (or the Linux kernel you're using
> is oplock aware) and use LockFileEx on the Windows side which Samba will
> map into fcntl locks on the Linux side.
The kernel I'm using does know about fcntl leases which I believe is
the underlying feature for oplocks ( gained this from poking at
oplock_linux.c ). If I can grab the write lease for myself, I know
samba is done writing the file. This works even under "
How does oplocks = no play into this? What about kernel oplocks = no?
I'm trying to understand what smbstatus -L is saying is locked per my
reply to Herb.
> If Windows explorer doesn't set file locks when copying using LockFileEx
> (and I don't think it does) then no, the POSIX apps won't see them.
Is there a way I can force the DENY_(ALL|WRITE) share mode to be turned into a
posix lock? Both copy.exe and explorer show the same type of status
when copying a file into the share.
Would this have some negative impact I'm missing?
Chris Green <cmg at dok.org>
A good pun is its own reword.
More information about the samba-technical