[Samba] Samba locks with PC crash

Jeremy Allison jra at samba.org
Thu Oct 13 17:52:55 GMT 2005


On Thu, Oct 13, 2005 at 08:23:27AM -0400, Yannick Bergeron wrote:
> We are experiencing this current problem: some users are locking Lotus Notes
> files on a Samba share. When their pc crash (ex: power off the pc without
> shutting down windows), the file is still locked. So when they boot up a few
> mins after the crash, they can't open Lotus Notes because some files are still
> locked by themself. So we need to kill the samba process. This is happening a
> lots of time in a week and we are looking for a better solution.
> 
> I just want to know how does Samba is working with this kind of situation?
> (timeout maybe? if there is a timeout, after how many time?)

As an smbd process reads the locking record for a file, it does a kill(pid,0)
on any stored lock owned by process <pid>, ensuring this process still exists.
If it doesn't exist, it removes that record and ignores the lock. That's how
the locking db is self-cleaning. There are no timeouts.

Jeremy.


More information about the samba mailing list