Bug 948086
Summary: | concurrent ls on NFS results in inconsistent views | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Anand Avati <aavati> |
Component: | posix | Assignee: | Vijay Bellur <vbellur> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | mainline | CC: | chrisw, gluster-bugs, michael, yinyin2010 |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.4.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-24 17:09:12 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: | 952693 |
Description
Anand Avati
2013-04-03 23:49:40 UTC
*** Bug 948088 has been marked as a duplicate of this bug. *** *** Bug 948087 has been marked as a duplicate of this bug. *** REVIEW: http://review.gluster.org/4963 (posix: fix dangerous "sharing" of fd in readdir between two requests) posted (#1) for review on release-3.4 by Vijay Bellur (vbellur) COMMIT: http://review.gluster.org/4963 committed in release-3.4 by Anand Avati (avati) ------ commit 5ac55756cd923e4bb1e5b5df50aeaf198d5531b7 Author: Anand Avati <avati> Date: Wed Apr 3 16:31:07 2013 -0700 posix: fix dangerous "sharing" of fd in readdir between two requests posix_fill_readdir() is a multi-step function which performs many readdir() calls, and expects the directory cursor to have not "seeked away" elsewhere between two successive iterations. Usually this is not a problem as each opendir() from an application has its own backend fd, and there is nobody else to "seek away" the directory cursor. However in case of NFS's use of anonymous fd, the same fd_t is shared between all NFS readdir requests, and two readdir loops can be executing in parallel on the same dir dragging away the cursor in a chaotic manner. The fix in this patch is to lock on the fd around the loop. Another approach could be to reimplement posix_fill_readdir() with a single getdents() call, but that's for another day. Change-Id: Ia42e9c7fbcde43af4c0d08c20cc0f7419b98bd3f BUG: 948086 Signed-off-by: Anand Avati <avati> Reviewed-on: http://review.gluster.org/4774 Reviewed-by: Jeff Darcy <jdarcy> Tested-by: Gluster Build System <jenkins.com> Reviewed-on: http://review.gluster.org/4963 |