Bug 1017478 - manpage for flock(2) says that flock() does not lock files over NFS, when it does
manpage for flock(2) says that flock() does not lock files over NFS, when it ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: man-pages-overrides (Show other bugs)
6.4
All Linux
unspecified Severity low
: rc
: ---
Assigned To: Jan Chaloupka
Iveta Wiedermann
: ManPageChange, Patch
Depends On:
Blocks: 1119562
  Show dependency treegraph
 
Reported: 2013-10-09 21:52 EDT by advax
Modified: 2014-10-14 03:26 EDT (History)
7 users (show)

See Also:
Fixed In Version: man-pages-overrides-6.6.2-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: insufficient information about locking files over NFS Consequence: incomplete documenation Fix: information about locking files over NFS is added Result: updated documentation
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-14 03:26:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The upstream patch (1.93 KB, text/plain)
2014-06-16 12:08 EDT, Steve Dickson
no flags Details
flock.2 NFS flock for MPO (2.15 KB, patch)
2014-06-17 01:58 EDT, Jan Chaloupka
no flags Details | Diff

  None (edit)
Description advax 2013-10-09 21:52:50 EDT
The manpage for flock(2) states:

flock()  does  not lock files over NFS.  Use fcntl(2) instead: that does  work   over NFS, given a sufficiently recent version of Linux and a server which supports locking.

But as far as I can tell, from a programmer's point of view, flock() does work over NFS. The shell command "flock a.a bash" experimentlaly locks a file on an NFS mounted volume, while in e.g. linux-2.6.18-274.3.1.el5.x86_64/fs/nfs/file.c
there is a comment
"We're simulating flock() locks using posix locks on the server"

suggesting to me that flock() works on NFS in RHEL5 and RHEL6.
Comment 2 Jan Chaloupka 2014-06-12 08:15:00 EDT
Adding steved@redhat.com.

Hi, Steve,

any progress?

Jan
Comment 3 Michael Kerrisk 2014-06-12 08:57:10 EDT
Upstream e449654fdb3f19aafc569df47d12bffdf6276236 probably addresss this bug, I think. That change will go out with the next release.
Comment 4 Steve Dickson 2014-06-16 11:17:27 EDT
(In reply to Michael Kerrisk from comment #3)
> Upstream e449654fdb3f19aafc569df47d12bffdf6276236 probably addresss this
> bug, I think. That change will go out with the next release.

What git tree is that commit relative to?
Comment 5 Michael Kerrisk 2014-06-16 11:23:36 EDT
man-pages Git
https://www.kernel.org/doc/man-pages/download.html
Comment 6 Steve Dickson 2014-06-16 12:08:57 EDT
Created attachment 909193 [details]
The upstream patch
Comment 8 Jan Chaloupka 2014-06-17 01:58:34 EDT
Created attachment 909385 [details]
flock.2 NFS flock for MPO
Comment 9 Jan Chaloupka 2014-06-17 02:00:31 EDT
Thank you very much guys
Comment 17 errata-xmlrpc 2014-10-14 03:26:24 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1382.html

Note You need to log in before you can comment on or make changes to this bug.