Bug 5994 - mount.cifs: brl option does not produce documented semantics for fcntl(F_SETLK)
mount.cifs: brl option does not produce documented semantics for fcntl(F_SETLK)
Status: RESOLVED FIXED
Product: CifsVFS
Classification: Unclassified
Component: user space tools
2.6
Other Linux
: P3 normal
: ---
Assigned To: Steve French
http://bugs.debian.org/483507
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-25 11:33 UTC by Debian samba package maintainers (PUBLIC MAILING LIST)
Modified: 2011-01-28 04:31 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian samba package maintainers (PUBLIC MAILING LIST) 2008-12-25 11:33:17 UTC
The above URL gives the entire bug report from our user. I'm just passing it through as, frankly, this goes much further than my own expertise

Getting more details or rationale probably needs to get in touch with the original bug submitter...

-- 
Christian Perrier, on behalf of samba package maintainers in Debian
Comment 1 Daniel Kahn Gillmor 2008-12-26 16:35:05 UTC
I'm the original reporter.  it's been a while since i reported this, but i'm happy to dig back into my notes if i can help move the problem toward a resolution.
Comment 2 Shirish S. Pargaonkar 2009-03-05 12:33:34 UTC
I am using the test program, the only modification I did was to add a printf in
the else of both if (0 != fcntl()) statements.

I do not see errors, the F_SETLK command with F_WRLCK type succeeds.

Using cifs vfs version 1.57 and samba server version 3.2.5.

Comment 3 Shirish S. Pargaonkar 2009-03-05 13:44:15 UTC
cifstest6:~ # grep mnt /proc/mounts
//cifstest8/smb8 /mnt/smb_a cifs rw,mand,unc=\\cifstest8\smb8,
username=root,addr=9.3.123.456,posixpaths,acl,rsize=16384,wsize=57344 0 0

cifstest6:~ # echo -n a > /mnt/smb_a/foo

cifstest6:~ # chmod g+s,g-x /mnt/smb_a/foo

cifstest6:~ # ls -la /mnt/smb_a/foo
-rwxr--r-- 1 nobody nobody 1 Mar  5 13:35 /mnt/smb_a/foo

cifstest6:~ # /tmp/fcntltest /mnt/smb_a/foo
fcntl fd F_RDLCK SETLK64 succeeded
fcntl fd F_WRLCK SETLK64 succeeded
Comment 4 Debian samba package maintainers (PUBLIC MAILING LIST) 2009-04-04 08:22:46 UTC
Shirish mentioned this bug is not reproducible on 3.2.5
Comment 5 Geert Janssens 2011-01-28 04:31:06 UTC
How about this situation:
I have an sqlite3 file that is hosted on a Windows XP machine. The share is mounted via mount.cifs on my Fedora 14 client machine. Whenever I try to use the sqlite3 file, I get locking errors. Some searches on the web referred to the nobrl option and eventually lead to this bug report. Using nobrl indeed does remove the locking errors, but is not really a good solution.

I googled for "sqlite3 cifs" and it returned several threads along the same lines. The problem also appears when a Vista server is used (according to these threads). And some seem to suggest that the problem doesn't happen when working between Windows machines (ie using a Windows pc for both the server side and the client side).

It's not clear to me if my issue is what this bug is about, but I got here via lauchpad bug 117730, which linked to the debian bug in the url above which got me here.

It seems this bug has been closed because it was not reproducible with a Samba server. I am however using a Windows XP machine as a server, and only use the mount.cifs client application. Is that supposed to work without problems ? I sure doesn't for me. If it should, then IMO this bug should be reopened.