diff options
author | Shyam <srangana@redhat.com> | 2015-01-08 13:56:08 -0500 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-01-12 21:14:52 -0800 |
commit | 3971315248c57386e05e6c8f57369a4571555cb2 (patch) | |
tree | 9728c3b139105d8bb08e2df3dbcf8abd7588d4ff /xlators/mount/fuse/src/fuse-bridge.h | |
parent | 9d37406b59fc33940c8e4e925ef9803b2d9b6507 (diff) |
fuse: Fix cores in notify function when this is executed in parallel
The fuse notify function gets called by the epoll or the poll thread
and till the point there is a single epoll thread, 2 notify
instances would not race with each other.
With the upcoming multi thread epoll changes, it is possible that
2 epoll threads invoke the notify function. As a result races
in this function are fixed with this commit.
The races seen are detailed in the bug, and the fix here is to
enforce a (slightly) longer critical section when updating the
fuse private structure and reserving state updates post error
handling.
Change-Id: I6974bc043cb59eb6dc39c5777123364dcefca358
BUG: 1180231
Signed-off-by: Shyam <srangana@redhat.com>
Reviewed-on: http://review.gluster.org/9421
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index d0d4120026b..1a0d74cd4cd 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -128,6 +128,10 @@ struct fuse_private { /* for using fuse-kernel readdirp*/ gf_boolean_t use_readdirp; + + /* fini started, helps prevent multiple epoll worker threads + * firing up the fini routine */ + gf_boolean_t fini_invoked; }; typedef struct fuse_private fuse_private_t; |