summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/glfs-master.c21
-rw-r--r--libglusterfs/src/glusterfs/xlator.h7
-rw-r--r--libglusterfs/src/xlator.c154
-rw-r--r--xlators/cluster/dht/src/Makefile.am14
-rw-r--r--xlators/cluster/dht/src/dht.sym9
-rw-r--r--xlators/cluster/dht/src/nufa.c21
-rw-r--r--xlators/cluster/dht/src/nufa.sym8
-rw-r--r--xlators/cluster/dht/src/switch.c21
-rw-r--r--xlators/cluster/dht/src/switch.sym8
-rw-r--r--xlators/cluster/ec/src/ec.c20
-rw-r--r--xlators/debug/delay-gen/src/delay-gen.c17
-rw-r--r--xlators/debug/error-gen/src/error-gen.c17
-rw-r--r--xlators/debug/sink/src/sink.c12
-rw-r--r--xlators/debug/trace/src/trace.c14
-rw-r--r--xlators/features/compress/src/cdc.c12
-rw-r--r--xlators/features/gfid-access/src/gfid-access.c12
-rw-r--r--xlators/features/namespace/src/namespace.c13
-rw-r--r--xlators/features/quiesce/src/quiesce.c15
-rw-r--r--xlators/features/quota/src/Makefile.am5
-rw-r--r--xlators/features/quota/src/quotad.c22
-rw-r--r--xlators/features/quota/src/quotad.sym7
-rw-r--r--xlators/features/sdfs/src/sdfs.c17
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c14
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c13
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c12
-rw-r--r--xlators/nfs/server/src/nfs.c19
-rw-r--r--xlators/nfs/server/src/nfsserver.sym10
-rw-r--r--xlators/xlator.sym10
28 files changed, 286 insertions, 238 deletions
diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c
index 5c833b6106c..b4473b16604 100644
--- a/api/src/glfs-master.c
+++ b/api/src/glfs-master.c
@@ -169,6 +169,21 @@ struct xlator_dumpops dumpops;
struct xlator_fops fops;
-struct xlator_cbks cbks = {.forget = glfs_forget,
- .release = glfs_release,
- .releasedir = glfs_releasedir};
+struct xlator_cbks cbks = {
+ .forget = glfs_forget,
+ .release = glfs_release,
+ .releasedir = glfs_releasedir,
+};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .identifier = "glfs-api",
+ .category = GF_MAINTAINED,
+};
diff --git a/libglusterfs/src/glusterfs/xlator.h b/libglusterfs/src/glusterfs/xlator.h
index 12d507bc021..0c39f4bd3cc 100644
--- a/libglusterfs/src/glusterfs/xlator.h
+++ b/libglusterfs/src/glusterfs/xlator.h
@@ -866,13 +866,6 @@ struct _xlator {
uint32_t notify_down;
};
-typedef struct {
- int32_t (*init)(xlator_t *this);
- void (*fini)(xlator_t *this);
- int32_t (*reconfigure)(xlator_t *this, dict_t *options);
- event_notify_fn_t notify;
-} class_methods_t;
-
/* This would be the only structure which needs to be exported by
the translators. For the backward compatibility, in 4.x series
even the old exported fields will be supported */
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 13213d55994..3dc0c648177 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -214,26 +214,16 @@ xlator_volopt_dynload(char *xlator_type, void **dl_handle,
/* check new struct first, and then check this */
xlapi = dlsym(handle, "xlator_api");
if (!xlapi) {
- gf_msg("xlator", GF_LOG_DEBUG, 0, LG_MSG_DLSYM_ERROR,
- "dlsym(xlator_api) on %s. "
- "Fall back to old symbols",
- dlerror());
- /* This case is not an error for now, so allow it
- to fall back to old methods. */
- opt_list->given_opt = dlsym(handle, "options");
- if (!opt_list->given_opt) {
- dlerror();
- gf_msg("xlator", GF_LOG_ERROR, 0, LG_MSG_LOAD_FAILED,
- "Failed to load xlator opt table");
- goto out;
- }
- } else {
- opt_list->given_opt = xlapi->options;
- if (!opt_list->given_opt) {
- gf_msg("xlator", GF_LOG_ERROR, 0, LG_MSG_LOAD_FAILED,
- "Failed to load xlator options table");
- goto out;
- }
+ gf_msg("xlator", GF_LOG_ERROR, 0, LG_MSG_DLSYM_ERROR,
+ "dlsym(xlator_api) missing: %s", dlerror());
+ goto out;
+ }
+
+ opt_list->given_opt = xlapi->options;
+ if (!opt_list->given_opt) {
+ gf_msg("xlator", GF_LOG_ERROR, 0, LG_MSG_LOAD_FAILED,
+ "Failed to load xlator options table");
+ goto out;
}
*dl_handle = handle;
@@ -249,110 +239,8 @@ out:
return ret;
}
-int
-xlator_dynload_oldway(xlator_t *xl)
-{
- int i = 0;
- int ret = -1;
- void *handle = NULL;
- volume_opt_list_t *vol_opt = NULL;
- class_methods_t *vtbl = NULL;
-
- handle = xl->dlhandle;
-
- xl->fops = dlsym(handle, "fops");
- if (!xl->fops) {
- gf_msg("xlator", GF_LOG_WARNING, 0, LG_MSG_DLSYM_ERROR,
- "dlsym(fops) on %s", dlerror());
- goto out;
- }
-
- xl->cbks = dlsym(handle, "cbks");
- if (!xl->cbks) {
- gf_msg("xlator", GF_LOG_WARNING, 0, LG_MSG_DLSYM_ERROR,
- "dlsym(cbks) on %s", dlerror());
- goto out;
- }
-
- /*
- * If class_methods exists, its contents override any definitions of
- * init or fini for that translator. Otherwise, we fall back to the
- * older method of looking for init and fini directly.
- */
- vtbl = dlsym(handle, "class_methods");
- if (vtbl) {
- xl->init = vtbl->init;
- xl->fini = vtbl->fini;
- xl->reconfigure = vtbl->reconfigure;
- xl->notify = vtbl->notify;
- } else {
- if (!(*VOID(&xl->init) = dlsym(handle, "init"))) {
- gf_msg("xlator", GF_LOG_WARNING, 0, LG_MSG_DLSYM_ERROR,
- "dlsym(init) on %s", dlerror());
- goto out;
- }
-
- if (!(*VOID(&(xl->fini)) = dlsym(handle, "fini"))) {
- gf_msg("xlator", GF_LOG_WARNING, 0, LG_MSG_DLSYM_ERROR,
- "dlsym(fini) on %s", dlerror());
- goto out;
- }
- if (!(*VOID(&(xl->reconfigure)) = dlsym(handle, "reconfigure"))) {
- gf_msg_trace("xlator", 0,
- "dlsym(reconfigure) on %s "
- "-- neglecting",
- dlerror());
- }
- if (!(*VOID(&(xl->notify)) = dlsym(handle, "notify"))) {
- gf_msg_trace("xlator", 0,
- "dlsym(notify) on %s -- "
- "neglecting",
- dlerror());
- }
- }
-
- if (!(xl->dumpops = dlsym(handle, "dumpops"))) {
- gf_msg_trace("xlator", 0,
- "dlsym(dumpops) on %s -- "
- "neglecting",
- dlerror());
- }
-
- if (!(*VOID(&(xl->mem_acct_init)) = dlsym(handle, "mem_acct_init"))) {
- gf_msg_trace(xl->name, 0,
- "dlsym(mem_acct_init) on %s -- "
- "neglecting",
- dlerror());
- }
-
- vol_opt = GF_CALLOC(1, sizeof(volume_opt_list_t),
- gf_common_mt_volume_opt_list_t);
-
- if (!vol_opt) {
- goto out;
- }
-
- INIT_LIST_HEAD(&vol_opt->list);
- vol_opt->given_opt = dlsym(handle, "options");
- if (!vol_opt->given_opt) {
- vol_opt->given_opt = default_options;
- }
- list_add_tail(&vol_opt->list, &xl->volume_options);
-
- /* make sure 'min' is set to high value, so it would be
- properly set later */
- for (i = 0; i < GF_FOP_MAXVALUE; i++) {
- xl->stats.interval.latencies[i].min = 0xffffffff;
- }
-
- ret = 0;
-
-out:
- return ret;
-}
-
-int
-xlator_dynload_newway(xlator_t *xl)
+static int
+xlator_dynload_apis(xlator_t *xl)
{
int ret = -1;
void *handle = NULL;
@@ -363,13 +251,9 @@ xlator_dynload_newway(xlator_t *xl)
xlapi = dlsym(handle, "xlator_api");
if (!xlapi) {
- gf_msg("xlator", GF_LOG_INFO, 0, LG_MSG_DLSYM_ERROR,
- "dlsym(xlator_api) on %s. "
- "Fall back to old symbols",
- dlerror());
- /* This case is not an error for now, so allow it
- to fall back to old methods. */
- ret = 1;
+ gf_msg("xlator", GF_LOG_ERROR, 0, LG_MSG_DLSYM_ERROR,
+ "dlsym(xlator_api) missing: %s", dlerror());
+ ret = -1;
goto out;
}
@@ -492,15 +376,9 @@ xlator_dynload(xlator_t *xl)
}
xl->dlhandle = handle;
- ret = xlator_dynload_newway(xl);
+ ret = xlator_dynload_apis(xl);
if (-1 == ret)
goto out;
- if (1 == ret) {
- /* it means we don't find the new symbol in xlator code */
- ret = xlator_dynload_oldway(xl);
- if (-1 == ret)
- goto out;
- }
fill_defaults(xl);
diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
index caeb17b0f07..56f1f2ad7c8 100644
--- a/xlators/cluster/dht/src/Makefile.am
+++ b/xlators/cluster/dht/src/Makefile.am
@@ -14,19 +14,13 @@ dht_la_SOURCES = $(dht_common_source) dht.c
nufa_la_SOURCES = $(dht_common_source) nufa.c
switch_la_SOURCES = $(dht_common_source) switch.c
-dht_la_LDFLAGS = -module \
- -export-symbols $(top_srcdir)/xlators/cluster/dht/src/dht.sym \
- $(GF_XLATOR_LDFLAGS)
+dht_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-nufa_la_LDFLAGS = -module \
- -export-symbols $(top_srcdir)/xlators/cluster/dht/src/nufa.sym \
- $(GF_XLATOR_LDFLAGS)
+nufa_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
nufa_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-switch_la_LDFLAGS = -module \
- -export-symbols $(top_srcdir)/xlators/cluster/dht/src/switch.sym \
- $(GF_XLATOR_LDFLAGS)
+switch_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
switch_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = dht-common.h dht-mem-types.h dht-messages.h \
@@ -41,8 +35,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
CLEANFILES =
-EXTRA_DIST = dht.sym nufa.sym switch.sym
-
uninstall-local:
rm -f $(DESTDIR)$(xlatordir)/distribute.so
diff --git a/xlators/cluster/dht/src/dht.sym b/xlators/cluster/dht/src/dht.sym
deleted file mode 100644
index 24241a91baf..00000000000
--- a/xlators/cluster/dht/src/dht.sym
+++ /dev/null
@@ -1,9 +0,0 @@
-xlator_api
-fops
-cbks
-class_methods
-dht_methods
-options
-mem_acct_init
-reconfigure
-dumpops
diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c
index 558611384fe..59313639c45 100644
--- a/xlators/cluster/dht/src/nufa.c
+++ b/xlators/cluster/dht/src/nufa.c
@@ -599,11 +599,6 @@ dht_methods_t dht_methods = {
.layout_search = dht_layout_search,
};
-class_methods_t class_methods = {.init = nufa_init,
- .fini = dht_fini,
- .reconfigure = dht_reconfigure,
- .notify = dht_notify};
-
struct xlator_fops fops = {
.lookup = nufa_lookup,
.create = nufa_create,
@@ -645,3 +640,19 @@ struct xlator_fops fops = {
};
struct xlator_cbks cbks = {.forget = dht_forget};
+extern int32_t
+mem_acct_init(xlator_t *this);
+
+xlator_api_t xlator_api = {
+ .init = nufa_init,
+ .fini = dht_fini,
+ .notify = dht_notify,
+ .reconfigure = dht_reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = dht_options,
+ .identifier = "nufa",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/cluster/dht/src/nufa.sym b/xlators/cluster/dht/src/nufa.sym
deleted file mode 100644
index 780b5fc0387..00000000000
--- a/xlators/cluster/dht/src/nufa.sym
+++ /dev/null
@@ -1,8 +0,0 @@
-fops
-cbks
-class_methods
-dht_methods
-options
-mem_acct_init
-reconfigure
-dumpops
diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c
index a3c384b0f5c..a782fcdfbd2 100644
--- a/xlators/cluster/dht/src/switch.c
+++ b/xlators/cluster/dht/src/switch.c
@@ -823,11 +823,6 @@ err:
return -1;
}
-class_methods_t class_methods = {.init = switch_init,
- .fini = switch_fini,
- .reconfigure = dht_reconfigure,
- .notify = dht_notify};
-
struct xlator_fops fops = {
.lookup = switch_lookup,
.create = switch_create,
@@ -869,3 +864,19 @@ struct xlator_fops fops = {
};
struct xlator_cbks cbks = {.forget = dht_forget};
+extern int32_t
+mem_acct_init(xlator_t *this);
+
+xlator_api_t xlator_api = {
+ .init = switch_init,
+ .fini = switch_fini,
+ .notify = dht_notify,
+ .reconfigure = dht_reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = dht_options,
+ .identifier = "switch",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/cluster/dht/src/switch.sym b/xlators/cluster/dht/src/switch.sym
deleted file mode 100644
index 780b5fc0387..00000000000
--- a/xlators/cluster/dht/src/switch.sym
+++ /dev/null
@@ -1,8 +0,0 @@
-fops
-cbks
-class_methods
-dht_methods
-options
-mem_acct_init
-reconfigure
-dumpops
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index d6336953343..13ffeb96012 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -1666,4 +1666,22 @@ struct volume_options options[] = {
"specially for sequential writes. However, this will also"
"lead to extra memory consumption, maximum "
"(cache size * stripe size) Bytes per open file."},
- {.key = {NULL}}};
+ {
+ .key = {NULL},
+ },
+};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "disperse",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/debug/delay-gen/src/delay-gen.c b/xlators/debug/delay-gen/src/delay-gen.c
index a2d02527f23..76efacb3044 100644
--- a/xlators/debug/delay-gen/src/delay-gen.c
+++ b/xlators/debug/delay-gen/src/delay-gen.c
@@ -679,4 +679,19 @@ struct volume_options options[] = {
.default_value = "",
},
- {.key = {NULL}}};
+ {.key = {NULL}},
+};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {GD_OP_VERSION_3_12_0},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "delay-gen",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c
index 3d271b2ef21..3416d63fa20 100644
--- a/xlators/debug/error-gen/src/error-gen.c
+++ b/xlators/debug/error-gen/src/error-gen.c
@@ -1644,4 +1644,19 @@ struct volume_options options[] = {
.flags = OPT_FLAG_SETTABLE,
},
- {.key = {NULL}}};
+ {.key = {NULL}},
+};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "error-gen",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/debug/sink/src/sink.c b/xlators/debug/sink/src/sink.c
index 965efd811ae..9822bbb732e 100644
--- a/xlators/debug/sink/src/sink.c
+++ b/xlators/debug/sink/src/sink.c
@@ -80,3 +80,15 @@ struct xlator_cbks cbks = {};
struct volume_options options[] = {
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .op_version = {GD_OP_VERSION_3_12_0},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "sink",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c
index 0aca3a9a5bb..3db2e263524 100644
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -3520,3 +3520,17 @@ struct volume_options options[] = {
};
struct xlator_dumpops dumpops = {.history = trace_dump_history};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "trace",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/compress/src/cdc.c b/xlators/features/compress/src/cdc.c
index 19e56b0daa5..b0b51e914ed 100644
--- a/xlators/features/compress/src/cdc.c
+++ b/xlators/features/compress/src/cdc.c
@@ -334,3 +334,15 @@ struct volume_options options[] = {
"to disk as a gzip file."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {GD_OP_VERSION_3_9_0},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "cdc",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c
index 450f108d16e..4a422ee658c 100644
--- a/xlators/features/gfid-access/src/gfid-access.c
+++ b/xlators/features/gfid-access/src/gfid-access.c
@@ -1408,3 +1408,15 @@ struct volume_options options[] = {
/* This translator doesn't take any options, or provide any options */
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "gfid-access",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/namespace/src/namespace.c b/xlators/features/namespace/src/namespace.c
index e56cf248076..59045e8647b 100644
--- a/xlators/features/namespace/src/namespace.c
+++ b/xlators/features/namespace/src/namespace.c
@@ -1330,3 +1330,16 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .op_version = {GD_OP_VERSION_3_12_0},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "namespace",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/quiesce/src/quiesce.c b/xlators/features/quiesce/src/quiesce.c
index f1cc648ac4b..abdb901f356 100644
--- a/xlators/features/quiesce/src/quiesce.c
+++ b/xlators/features/quiesce/src/quiesce.c
@@ -2664,3 +2664,18 @@ struct volume_options options[] = {
"the thin clients can failover to."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {GD_OP_VERSION_3_12_0},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "quiesce",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
index 0ae47fc189f..1c2dcef0ca3 100644
--- a/xlators/features/quota/src/Makefile.am
+++ b/xlators/features/quota/src/Makefile.am
@@ -4,7 +4,7 @@ endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
quota_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
-quotad_la_LDFLAGS = -module -export-symbols $(top_srcdir)/xlators/features/quota/src/quotad.sym $(GF_XLATOR_LDFLAGS)
+quotad_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
quota_la_SOURCES = quota.c quota-enforcer-client.c
quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
@@ -27,6 +27,3 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
AM_CFLAGS = -Wall $(GF_CFLAGS)
CLEANFILES =
-
-EXTRA_DIST = quotad.sym
-
diff --git a/xlators/features/quota/src/quotad.c b/xlators/features/quota/src/quotad.c
index cfc74ff6985..ee1a600e60f 100644
--- a/xlators/features/quota/src/quotad.c
+++ b/xlators/features/quota/src/quotad.c
@@ -220,11 +220,6 @@ err:
return ret;
}
-class_methods_t class_methods = {.init = qd_init,
- .fini = qd_fini,
- .reconfigure = qd_reconfigure,
- .notify = qd_notify};
-
struct xlator_fops fops = {};
struct xlator_cbks cbks = {};
@@ -240,4 +235,19 @@ struct volume_options options[] = {
.key = {"transport.*"},
.type = GF_OPTION_TYPE_ANY,
},
- {.key = {NULL}}};
+ {.key = {NULL}},
+};
+
+xlator_api_t xlator_api = {
+ .init = qd_init,
+ .fini = qd_fini,
+ .reconfigure = qd_reconfigure,
+ .notify = qd_notify,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "quotad",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/quota/src/quotad.sym b/xlators/features/quota/src/quotad.sym
deleted file mode 100644
index 0829ffe1584..00000000000
--- a/xlators/features/quota/src/quotad.sym
+++ /dev/null
@@ -1,7 +0,0 @@
-fops
-cbks
-class_methods
-options
-mem_acct_init
-reconfigure
-dumpops
diff --git a/xlators/features/sdfs/src/sdfs.c b/xlators/features/sdfs/src/sdfs.c
index 5dbe0653cbc..132f97ca4ea 100644
--- a/xlators/features/sdfs/src/sdfs.c
+++ b/xlators/features/sdfs/src/sdfs.c
@@ -1425,12 +1425,11 @@ out:
return ret;
}
-int
+void
fini(xlator_t *this)
{
mem_pool_destroy(this->local_pool);
-
- return 0;
+ return;
}
struct xlator_fops fops = {
@@ -1458,3 +1457,15 @@ struct volume_options options[] = {
.description = "Enable/Disable dentry serialize functionality"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .op_version = {GD_OP_VERSION_4_0_0},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "sdfs",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index a0c739f58af..0322ac82f86 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -2559,3 +2559,17 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "snapview-client",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 3c48b067025..9fd2cfb41e6 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -2691,3 +2691,16 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "snapview-server",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index a451e18d343..45f387a0be1 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -2225,3 +2225,15 @@ struct volume_options options[] = {
" power. Range 1-32 threads."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "glusterd",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index ceb4943bc93..3dbe3c7cea1 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -1529,7 +1529,7 @@ notify(xlator_t *this, int32_t event, void *data, ...)
return 0;
}
-int
+void
fini(xlator_t *this)
{
struct nfs_state *nfs = NULL;
@@ -1539,7 +1539,7 @@ fini(xlator_t *this)
gf_msg_debug(GF_NFS, 0, "NFS service going down");
nfs_deinit_versions(&nfs->versions, this);
GF_FREE(this->instance_name);
- return 0;
+ return;
}
int32_t
@@ -2040,3 +2040,18 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "gnfs",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/nfs/server/src/nfsserver.sym b/xlators/nfs/server/src/nfsserver.sym
index 2126634962a..dce7d964e9e 100644
--- a/xlators/nfs/server/src/nfsserver.sym
+++ b/xlators/nfs/server/src/nfsserver.sym
@@ -1,12 +1,3 @@
-init
-fini
-fops
-cbks
-options
-notify
-mem_acct_init
-reconfigure
-dumpops
exp_file_parse
exp_file_print
exp_file_get_dir
@@ -18,3 +9,4 @@ ng_file_parse
ng_file_get_netgroup
ng_file_print
ng_file_deinit
+xlator_api
diff --git a/xlators/xlator.sym b/xlators/xlator.sym
index 67f7cdde1c2..76abe95d5b2 100644
--- a/xlators/xlator.sym
+++ b/xlators/xlator.sym
@@ -1,11 +1 @@
-class_methods
xlator_api
-init
-fini
-fops
-cbks
-options
-notify
-mem_acct_init
-reconfigure
-dumpops