Samba client problem with concurrently open files

Urban Widmark urban at svenskatest.se
Mon Nov 13 17:35:37 GMT 2000


On Sun, 12 Nov 2000, digital man wrote:

> I'm having a problem with the Samba client for Linux (Red Hat 6.2):

smbclient?

> I mount a Windows share on my Linux box and run my portable application that
    ^^^^^
or smbfs?
or ?

> opens files (and leaves them open) and uses record locking to prevent data
> corruption. The problem is that writes from the Windows machines to a file
> that is currently open on the Linux machine do not show up in the Linux
> application until it (the Linux app) closes and re-opens the file. Writes
> FROM the Linux app show up on the Windows machines immediately (no
> close/re-open necessary) and writes from the Windows apps show up on the
> other Windows machines just fine, so it doesn't appear to be a problem with
> the configuration of the server (WinME).

[Assuming smbfs ...]

Rh6.2, which kernel version? Some versions have problems with noticing
that things changed on the server side (if you do tail -f on something on 
the smb share it will never see any changes). Try updating to 2.2.18-pre21
(or wait for 2.2.18, shouldn't be too far away).

Could you explain "record locking" some more?
(example programs would be nice, for both win32 and linux, source and
 binary)

I fear that smbfs does not currently implement file locking as it should.
It always opens files read/write and hopes that this will block access on
the other side (I'm guessing here :)

I have a patch to improve smbfs locking from someone, but it still fails
on some things I believe it shouldn't.

/Urban





More information about the samba mailing list