summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 4071a7c0569..466be5e3a3a 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -15,9 +15,11 @@
#include "defaults.h"
#include "libglusterfs-messages.h"
-#define SET_DEFAULT_FOP(fn) do { \
- if (!xl->fops->fn) \
- xl->fops->fn = default_##fn; \
+#define SET_DEFAULT_FOP(fn) do { \
+ if (!xl->fops->fn) \
+ xl->fops->fn = default_##fn; \
+ if (!xl->pass_through_fops->fn) \
+ xl->pass_through_fops->fn = default_##fn; \
} while (0)
#define SET_DEFAULT_CBK(fn) do { \
@@ -54,6 +56,9 @@ fill_defaults (xlator_t *xl)
return;
}
+ if (!xl->pass_through_fops)
+ xl->pass_through_fops = default_fops;
+
SET_DEFAULT_FOP (create);
SET_DEFAULT_FOP (open);
SET_DEFAULT_FOP (stat);
@@ -386,6 +391,13 @@ int xlator_dynload_newway (xlator_t *xl)
xl->name);
}
+ xl->pass_through_fops = xlapi->pass_through_fops;
+ if (!xl->pass_through_fops) {
+ gf_msg_trace ("xlator", 0, "%s: method missing (pass_through_fops), "
+ "falling back to default",
+ xl->name);
+ }
+
vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t),
gf_common_mt_volume_opt_list_t);
if (!vol_opt) {