Bug 5126 - EACCES is returned instead of EAGAIN if fcntl(F_SETLK) request fails
EACCES is returned instead of EAGAIN if fcntl(F_SETLK) request fails
Status: RESOLVED INVALID
Product: CifsVFS
Classification: Unclassified
Component: kernel fs
2.6
Other Linux
: P3 normal
: ---
Assigned To: Jeff Layton
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-06 05:13 UTC by Timofey Kutergin
Modified: 2016-02-26 02:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timofey Kutergin 2007-12-06 05:13:12 UTC
We use old xBase applications running in dosemu on CIFS filesystem. Applications are multiuser, so locking is used to prevent editing of the same record by several users simultaneously. Problem is that on CIFS file system this seems to not work - several users may start to edit the same record on the same time. There is no such problem if NFS share is used instead. Using strace on dosemu.bin process, we discovered that difference in behavior between NFS and CIFS is that NFS returns EAGAIN when lock request is failed while CIFS returns EACCES.
This may be DOSEMU bug, fcntl() man page describes EACCES as valid error code when  lock is failed because of lock held by another process, but returning EAGAIN could have more sense, isn't it ?

Regards
Timofey
Comment 1 Jeff Layton 2012-04-28 00:35:53 UTC
Is this still a problem? If so, I could use some more details. You said this
application is multiuser. Are all the users running on the same machine or
different ones? What sort of server are you mounting here?
Comment 2 Steve French 2016-02-26 02:10:50 UTC
As you said, EACCES is valid when conflicting locks are held.  If you can see another issue (besides EACCES vs. EAGAIN) please reopen with the additional detail.