Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1017478

Summary: manpage for flock(2) says that flock() does not lock files over NFS, when it does
Product: Red Hat Enterprise Linux 6 Reporter: advax
Component: man-pages-overridesAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED ERRATA QA Contact: Iveta Wiedermann <isenfeld>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4CC: eguan, fs-qe, isenfeld, jchaloup, mtk.manpages, ovasik, steved
Target Milestone: rcKeywords: ManPageChange, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 07:26:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1119562    
Attachments:
Description Flags
The upstream patch
none
flock.2 NFS flock for MPO none

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.

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