| Summary: | Use correct flock structures in lk fops | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Pavan Vilas Sondur <pavan> |
| Component: | replicate | Assignee: | Pavan Vilas Sondur <pavan> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | urgent | ||
| Version: | mainline | CC: | fharshav, gluster-bugs, lakshmipathi, vijay |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | RTP | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
PATCH: http://patches.gluster.com/patch/3513 in release-3.0 (cluster/afr: Return correct flock structures correctly in lk fops.) PATCH: http://patches.gluster.com/patch/3514 in release-3.0 (features/locks: Check flock structure before proceeding with the lk call.) PATCH: http://patches.gluster.com/patch/3522 in release-3.0 (write-behind: fixes in flush) (In reply to comment #0) > Currently, flock structures are not being used properly. Correct their usage, > by separating out the user supplied flock with the 'returned' flock structure. > > Test for fix: > > Patch1 > > * For F_SETLK type calls (cmd == F_SETLK) > - All servers get the same flock structure. (verify using 'option trace on' > in the locks xlator on server(s)) > - Return flock does not matter. > * For F_SETLKW type calls (cmd == F_SETLKW) > SAME AS ABOVE > * For F_UNLCK type calls (cmd == F_UNLCK) > SAME AS ABOVE > > * For F_GETLK type calls (cmd == F_GETLK) > - All servers should get the same flock structure > - The returned flock should be the flock structure, where the lk call was > successful: > * If all fail, returned flock does not matter > * Partial failure: returned flock from any server where flock was > successful. > > > Patch2 > > * Correct error messages in the log and failure of lk call (return value = -1 > and errno = EINVAL) when flock is not filled properly: > * Negative l_len values > * Negative l_start values > > > Will attach 2 c programs to verify the above. where are the two "C" programs to be attached? PATCH: http://patches.gluster.com/patch/4169 in master (cluster/afr: Return correct flock structures correctly in lk fops) |
Currently, flock structures are not being used properly. Correct their usage, by separating out the user supplied flock with the 'returned' flock structure. Test for fix: Patch1 * For F_SETLK type calls (cmd == F_SETLK) - All servers get the same flock structure. (verify using 'option trace on' in the locks xlator on server(s)) - Return flock does not matter. * For F_SETLKW type calls (cmd == F_SETLKW) SAME AS ABOVE * For F_UNLCK type calls (cmd == F_UNLCK) SAME AS ABOVE * For F_GETLK type calls (cmd == F_GETLK) - All servers should get the same flock structure - The returned flock should be the flock structure, where the lk call was successful: * If all fail, returned flock does not matter * Partial failure: returned flock from any server where flock was successful. Patch2 * Correct error messages in the log and failure of lk call (return value = -1 and errno = EINVAL) when flock is not filled properly: * Negative l_len values * Negative l_start values Will attach 2 c programs to verify the above.