vfs_glusterfs changes to get rid of mutex use.

Ira Cooper ira at samba.org
Mon Jan 19 21:17:08 MST 2015

This patch removes all of the posix mutexes used in the previous GlusterFS
AIO patch in favor of using a standard POSIX pipe.  This also simplifies
the actual code, and makes our fork safety issues more apparent.

As part of this changeset, there is a basic set of "rules" around fork use
and VFS modules.  I expect they will be wordsmithed, but the basic ideas
are sound.

1. A child process should never interfere with a parent process.
2. If you call into the VFS after it has been initialized in a child
process, the behavior is "undefined" and could be as mean as someone
putting "abort" in every single call.  Calling it in the parent is totally

These rules also echo the similar conventions we use around "tevent" which
also apply so VFS modules can use tevent.   You don't reuse tevent contexts
in the child process :).

Feel free to correct me, this patch is based on those assumptions, as were
previous patches.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfs_glusterfs-Replace-eventfd-with-pipes-for-AIO-use.patch
Type: application/mbox
Size: 7498 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150119/cc2a3717/attachment.bin>

More information about the samba-technical mailing list