[Samba] O_EXCL unreliable?

Egon Eckert egon at heaven.industries.cz
Tue Jun 18 03:57:02 GMT 2002


> rename on smbfs works like this:
> 
> + If the file being moved is open, close it.
> + If the "target" exists
>   + close it if it was open 
>   + tell the server to unlink it
> + Send the move request.

Aaargh, I tried it, you are right.  'rename()' seems pretty
non-atomic on smbfs... :-(

> I suggested to someone that they may be better of with a lock
> directory instead of a file on smbfs. I don't know/remember if
> that helped.

Thanks.  We will have to find out something (we are trying to
synchronize Linux vs. Windows application).  "lock directory"
seems a bit strange/bizarre to me...  Lock regions (in files)
make me scared as well -- I see many problems/questions about
them here in the list (mostly unanswered :-) ).

Egon




More information about the samba mailing list