summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2016-12-05 13:01:41 -0500
committerRaghavendra G <rgowdapp@redhat.com>2017-01-05 20:38:49 -0800
commitc6b0adb483c1d0c4922e6d4cb77abfb69d314a8e (patch)
treec35bef5796bbb915486cb7dc53227afb9e366839 /libglusterfs/src/xlator.h
parentf60631904defdaec2f1bae84b3cfd6a3e083cf09 (diff)
libglusterfs: serialize init/reconfigure calls
These functions do not generally "expect" to be called more than once in parallel, and many are likely to misbehave in that case (one case in DHT already). Such parallel calls have not generally happened because there are only a few places where we call these functions, and those have been implicitly serialized until recently. However, recent changes in the epoll layer change that, as does brick multiplexing. Therefore, the serialization is now explicit at the init/reconfigure level. It would be sufficient to serialize calls to a particular translator's init and reconfigure functions, but that would require per-translator locks and a bit more complexity in maintaining/using them. Since there's no clear reason why we would need or want to support a higher level of parallelism, the simpler approach of a global lock should suffice. Change-Id: I26296c2826e91dc00b7f0c2061bcc2964ef90c4c BUG: 1399134 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/16030 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index b11d1a96f32..e28790cc034 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -1048,4 +1048,7 @@ glusterfs_reachable_leaves(xlator_t *base, dict_t *leaves);
int
xlator_subvolume_count (xlator_t *this);
+void xlator_init_lock (void);
+void xlator_init_unlock (void);
+
#endif /* _XLATOR_H */