Bug 731775
Summary: | dlm: dev_write no op messages when flocks are used my multiple processes | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Nate Straz <nstraz> | ||||
Component: | cluster | Assignee: | David Teigland <teigland> | ||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.2 | CC: | ccaulfie, cluster-maint, fdinitto, jpayne, lhh, rpeterso, sbradley, teigland | ||||
Target Milestone: | rc | Keywords: | Regression | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | cluster-3.0.12.1-13.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause: the patch for bug 678585 was incomplete. dlm_controld was still passing error results back to the kernel for posix unlock operations flagged with CLOSE.
Consequence: the kernel complains if it receives a posix lock result that it is not expecting: "dev_write no op ...". Many of these can appear, especially when using flocks (not posix locks).
Fix: dlm_controld is fixed to not pass error results to the kernel for posix unlock operations flagged with CLOSE.
Result: No "dev_write no op" messages should appear.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-12-06 14:52:54 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Nate Straz
2011-08-18 15:32:42 UTC
The bug is in dlm_controld. Created attachment 518927 [details]
the fix
dlm_controld: fix plock dev_write no op
When a plock unlock is received due to the file
being closed (the CLOSE flag is set), we should
not write an unlock result back to the kernel.
If we do, the kernel, which does not expect a
reply, will report the error "dev_write no op".
In cases where dlm_controld encounters and error
handling the unlock operation, it was writing
the error result back to the kernel, even though
the unlock was flagged with CLOSE. The fix is
to check for the CLOSE flag and skip writing
the error result, as we do with normal results.
This problem is especially visible when using
flocks (not plocks). This is because the kernel
generates extraneous plock unlock requests
when files are closed with flocks. Because
dlm_controld finds no plocks on the files,
it replies to the kernel with an error, rather
than skipping the reply to do CLOSE.
There are two ways reproduce this problem and likewise verify it is fixed: (here using people.redhat.com/teigland/doflock.c) 1. close a file with an flock on it # touch /gfs/a # ./doflock /gfs/a 1 1 0 2000000 1 there should be no dev_write error 2. run two processes both opening/locking/unlocking/closing the same file # touch /gfs/a # ./doflock /gfs/a 1 1 1 10000 1000 & ./doflock /gfs/a 1 1 1 10000 1000 there should be no dev_write errors Both tests create the error message prior to the fix, and don't after the fix. pushed to RHEL6 branch http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=95d90a01d89a610074a4817f1f2cbe67419a7654 For the record, I sent a patch upstream to eliminate the unnecessary posix unlocks when using flocks. I don't know if it will be accepted or not. http://marc.info/?l=linux-fsdevel&m=131377298029915&w=2 Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: the patch for bug 678585 was incomplete. dlm_controld was still passing error results back to the kernel for posix unlock operations flagged with CLOSE. Consequence: the kernel complains if it receives a posix lock result that it is not expecting: "dev_write no op ...". Many of these can appear, especially when using flocks (not posix locks). Fix: dlm_controld is fixed to not pass error results to the kernel for posix unlock operations flagged with CLOSE. Result: No "dev_write no op" messages should appear. Verified fixed using tests from Description comment, as well as both tests in comment #5. # uname -r; rpm -q cman 2.6.32-203.el6.x86_64 cman-3.0.12.1-23.el6.x86_64 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-2011-1516.html |