Bug 1017478 - manpage for flock(2) says that flock() does not lock files over NFS, when it does
Summary: manpage for flock(2) says that flock() does not lock files over NFS, when it ...
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: man-pages-overrides
Version: 6.4
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jan Chaloupka
QA Contact: Iveta Wiedermann
URL:
Whiteboard:
Keywords: ManPageChange, Patch
Depends On:
Blocks: 1119562
TreeView+ depends on / blocked
 
Reported: 2013-10-10 01:52 UTC by advax
Modified: 2014-10-14 07:26 UTC (History)
7 users (show)

(edit)
Cause: insufficient information about locking files over NFS

Consequence: incomplete documenation

Fix: information about locking files over NFS is added

Result: updated documentation
Clone Of:
(edit)
Last Closed: 2014-10-14 07:26:24 UTC


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1382 normal SHIPPED_LIVE man-pages-overrides bug fix update 2014-10-14 01:21:54 UTC

Description advax 2013-10-10 01:52:50 UTC
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 12:15:00 UTC
Adding steved@redhat.com.

Hi, Steve,

any progress?

Jan

Comment 3 Michael Kerrisk 2014-06-12 12:57:10 UTC
Upstream e449654fdb3f19aafc569df47d12bffdf6276236 probably addresss this bug, I think. That change will go out with the next release.

Comment 4 Steve Dickson 2014-06-16 15:17:27 UTC
(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 15:23:36 UTC
man-pages Git
https://www.kernel.org/doc/man-pages/download.html

Comment 6 Steve Dickson 2014-06-16 16:08:57 UTC
Created attachment 909193 [details]
The upstream patch

Comment 8 Jan Chaloupka 2014-06-17 05:58:34 UTC
Created attachment 909385 [details]
flock.2 NFS flock for MPO

Comment 9 Jan Chaloupka 2014-06-17 06:00:31 UTC
Thank you very much guys

Comment 17 errata-xmlrpc 2014-10-14 07:26:24 UTC
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.