summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-11-28 10:05:39 +0530
committerAmar Tumballi <amarts@redhat.com>2018-12-06 07:54:28 +0000
commit340e58f9b3bcdfe4314da65e592dcd5c2daf6fd9 (patch)
treee5e403711221b488ed6c4ee72322e2657d9065f8 /xlators
parent7ea5f438f60df9aa16027030f2b24f31bc07524b (diff)
all: add xlator_api to many translators
Fixes: #164 Change-Id: I93ad6f0232a1dc534df099059f69951e1339086f Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr.c19
-rw-r--r--xlators/debug/io-stats/src/io-stats.c15
-rw-r--r--xlators/features/arbiter/src/arbiter.c13
-rw-r--r--xlators/features/barrier/src/barrier.c15
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c14
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c14
-rw-r--r--xlators/features/changelog/src/changelog.c14
-rw-r--r--xlators/features/index/src/index.c14
-rw-r--r--xlators/features/leases/src/leases.c19
-rw-r--r--xlators/features/locks/src/posix.c20
-rw-r--r--xlators/features/marker/src/marker.c13
-rw-r--r--xlators/features/quota/src/quota.c13
-rw-r--r--xlators/features/read-only/src/read-only.c13
-rw-r--r--xlators/features/read-only/src/worm.c13
-rw-r--r--xlators/features/selinux/src/selinux.c13
-rw-r--r--xlators/features/shard/src/shard.c14
-rw-r--r--xlators/features/thin-arbiter/src/thin-arbiter.c13
-rw-r--r--xlators/features/trash/src/trash.c14
-rw-r--r--xlators/features/upcall/src/upcall.c20
-rw-r--r--xlators/features/utime/src/utime.c15
-rw-r--r--xlators/meta/src/meta.c16
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c14
-rw-r--r--xlators/performance/decompounder/src/decompounder.c18
-rw-r--r--xlators/performance/io-cache/src/io-cache.c14
-rw-r--r--xlators/performance/io-threads/src/io-threads.c15
-rw-r--r--xlators/performance/open-behind/src/open-behind.c14
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c14
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c13
-rw-r--r--xlators/performance/write-behind/src/write-behind.c14
-rw-r--r--xlators/protocol/client/src/client.c15
-rw-r--r--xlators/storage/posix/src/posix-common.c5
-rw-r--r--xlators/storage/posix/src/posix.c31
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c19
33 files changed, 472 insertions, 28 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 5d5e536ff60..c007ffef9f8 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -579,7 +579,7 @@ out:
return ret;
}
-int
+void
fini(xlator_t *this)
{
afr_private_t *priv = NULL;
@@ -595,7 +595,7 @@ fini(xlator_t *this)
afr_priv_destroy(priv);
// if (this->itable);//I don't see any destroy func
- return 0;
+ return;
}
struct xlator_fops fops = {
@@ -1166,3 +1166,18 @@ struct volume_options options[] = {
"and configuring it doesn't have any effect"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "replicate",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 71eae7bc7ed..7bf0d8a8f00 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -4406,3 +4406,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}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "io-stats",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/arbiter/src/arbiter.c b/xlators/features/arbiter/src/arbiter.c
index fa2b3bf5a6c..83a97e3354b 100644
--- a/xlators/features/arbiter/src/arbiter.c
+++ b/xlators/features/arbiter/src/arbiter.c
@@ -365,3 +365,16 @@ struct xlator_cbks cbks = {
struct volume_options options[] = {
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "arbiter",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c
index b40399d7f91..73e746f7d65 100644
--- a/xlators/features/barrier/src/barrier.c
+++ b/xlators/features/barrier/src/barrier.c
@@ -809,3 +809,18 @@ struct volume_options options[] = {
"blocked acknowledgements are sent to the application"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "barrier",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index f45d438ea07..d2d9dedf640 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -2212,3 +2212,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}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "bit-rot server",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index 673a9d551ee..f04b12d6834 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -3481,3 +3481,17 @@ struct volume_options options[] = {
.default_value = "{{ brick.path }}"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "bitrot-stub",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
index 933d28a17f8..1f42dbe178e 100644
--- a/xlators/features/changelog/src/changelog.c
+++ b/xlators/features/changelog/src/changelog.c
@@ -2910,3 +2910,17 @@ struct volume_options options[] = {
.tags = {"journal", "glusterfind"}},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "changelog",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 6099115d6e7..d9768b32d7f 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -2661,3 +2661,17 @@ struct volume_options options[] = {
.default_value = "trusted.afr.{{ volume.name }}"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "index",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c
index baeb8c7361c..de74312b0ba 100644
--- a/xlators/features/leases/src/leases.c
+++ b/xlators/features/leases/src/leases.c
@@ -1000,14 +1000,14 @@ out:
return ret;
}
-int
+void
fini(xlator_t *this)
{
leases_private_t *priv = NULL;
priv = this->private;
if (!priv) {
- return 0;
+ return;
}
this->private = NULL;
@@ -1024,7 +1024,7 @@ fini(xlator_t *this)
glusterfs_ctx_tw_put(this->ctx);
this->ctx->tw = NULL;
}
- return 0;
+ return;
}
static int
@@ -1135,3 +1135,16 @@ struct volume_options options[] = {
" will be forcefully purged by the server."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "leases",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 8112b1ec6ba..ce6b6f9fbfc 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -3741,19 +3741,19 @@ out:
return ret;
}
-int
+void
fini(xlator_t *this)
{
posix_locks_private_t *priv = NULL;
priv = this->private;
if (!priv)
- return 0;
+ return;
this->private = NULL;
GF_FREE(priv->brickname);
GF_FREE(priv);
- return 0;
+ return;
}
int
@@ -4490,3 +4490,17 @@ struct volume_options options[] = {
"be sent."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "locks",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index ed3fce0b10a..b6ce42a025e 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -3564,3 +3564,16 @@ struct volume_options options[] = {
.flags = OPT_FLAG_NONE,
},
{.key = {NULL}}};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "marker",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index aec367d9978..84df5c3caff 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -5292,3 +5292,16 @@ struct volume_options options[] = {
.tags = {},
},
{.key = {NULL}}};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "quota",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/read-only/src/read-only.c b/xlators/features/read-only/src/read-only.c
index b206d2f5545..ac966633c34 100644
--- a/xlators/features/read-only/src/read-only.c
+++ b/xlators/features/read-only/src/read-only.c
@@ -130,3 +130,16 @@ struct volume_options options[] = {
"\"off\" by default."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "read-only",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c
index b891473f515..8bbea21e6d3 100644
--- a/xlators/features/read-only/src/worm.c
+++ b/xlators/features/read-only/src/worm.c
@@ -634,3 +634,16 @@ struct volume_options options[] = {
.description = "Auto commit period for the files."},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "worm",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/selinux/src/selinux.c b/xlators/features/selinux/src/selinux.c
index d47521d55a7..58b4c5d4503 100644
--- a/xlators/features/selinux/src/selinux.c
+++ b/xlators/features/selinux/src/selinux.c
@@ -310,3 +310,16 @@ struct volume_options options[] = {
{
.key = {NULL},
}};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "selinux",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index f0fd12785ac..61ad0e188d1 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -6862,3 +6862,17 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "shard",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/thin-arbiter/src/thin-arbiter.c b/xlators/features/thin-arbiter/src/thin-arbiter.c
index e1bfaa803c8..ce3008636f1 100644
--- a/xlators/features/thin-arbiter/src/thin-arbiter.c
+++ b/xlators/features/thin-arbiter/src/thin-arbiter.c
@@ -646,3 +646,16 @@ struct xlator_cbks cbks = {};
struct volume_options options[] = {
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {GD_OP_VERSION_6_0},
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "thin-arbiter",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index 51dc6fac7ab..d66843625d3 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -2636,3 +2636,17 @@ struct volume_options options[] = {
.default_value = "{{ brick.path }}"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "trash",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/features/upcall/src/upcall.c b/xlators/features/upcall/src/upcall.c
index f0d0cc48311..2583c50ef3f 100644
--- a/xlators/features/upcall/src/upcall.c
+++ b/xlators/features/upcall/src/upcall.c
@@ -2335,14 +2335,14 @@ out:
return ret;
}
-int
+void
fini(xlator_t *this)
{
upcall_private_t *priv = NULL;
priv = this->private;
if (!priv) {
- return 0;
+ return;
}
this->private = NULL;
@@ -2367,7 +2367,7 @@ fini(xlator_t *this)
this->local_pool = NULL;
}
- return 0;
+ return;
}
int
@@ -2527,3 +2527,17 @@ struct volume_options options[] = {
.tags = {"cache", "cachetimeout", "upcall"}},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "upcall",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/features/utime/src/utime.c b/xlators/features/utime/src/utime.c
index 418e4c4a0d5..877c751c764 100644
--- a/xlators/features/utime/src/utime.c
+++ b/xlators/features/utime/src/utime.c
@@ -230,3 +230,18 @@ struct volume_options options[] = {
"enabled. When noatime is on, atime is not updated with "
"ctime feature enabled and vice versa."},
{.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_5_0},
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "utime",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/meta/src/meta.c b/xlators/meta/src/meta.c
index ab131d798ae..e1b9a2b6581 100644
--- a/xlators/meta/src/meta.c
+++ b/xlators/meta/src/meta.c
@@ -226,11 +226,11 @@ out:
return ret;
}
-int
+void
fini(xlator_t *this)
{
GF_FREE(this->private);
- return 0;
+ return;
}
struct xlator_fops fops = {.lookup = meta_lookup,
@@ -262,3 +262,15 @@ struct volume_options options[] = {
.description = "Name of default meta directory."},
{.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 = "meta",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 0173046c3c3..3b2622b431f 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -6668,3 +6668,17 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .dumpops = &dumpops,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "fuse",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/performance/decompounder/src/decompounder.c b/xlators/performance/decompounder/src/decompounder.c
index 6fb7f534e3f..2650d83237e 100644
--- a/xlators/performance/decompounder/src/decompounder.c
+++ b/xlators/performance/decompounder/src/decompounder.c
@@ -819,15 +819,27 @@ out:
return ret;
}
-int32_t
+void
fini(xlator_t *this)
{
if (!this)
- return 0;
+ return;
if (this->local_pool) {
mem_pool_destroy(this->local_pool);
this->local_pool = NULL;
}
- return 0;
+ return;
}
+
+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 = "decompounder",
+ .category = GF_TECH_PREVIEW,
+};
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 24fc1742899..275c1039789 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -2176,3 +2176,17 @@ struct volume_options options[] = {
.description = "Enable/Disable io cache translator"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "io-cache",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index cbad2f6e37f..3449718c2d4 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -1560,3 +1560,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}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "io-threads",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c
index 0d1224fc438..590e0b0d996 100644
--- a/xlators/performance/open-behind/src/open-behind.c
+++ b/xlators/performance/open-behind/src/open-behind.c
@@ -1349,3 +1349,17 @@ struct volume_options options[] = {
{.key = {NULL}}
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "open-behind",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index 66be002bc37..22a2ae29f50 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -1253,3 +1253,17 @@ struct volume_options options[] = {
.description = "Enable/Disable read ahead translator"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "read-ahead",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 4419b0ccf97..3a030ecbdc8 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -1285,3 +1285,16 @@ struct volume_options options[] = {
.description = "Enable/Disable readdir ahead translator"},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "readdir-ahead",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index a3404425303..65c72cfa894 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -3236,3 +3236,17 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "write-ahead",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 44fd4d5409f..38723b43b45 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -2981,3 +2981,18 @@ struct volume_options options[] = {
.flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .notify = notify,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "client",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
index 573f2e0103b..fd7c9fe779b 100644
--- a/xlators/storage/posix/src/posix-common.c
+++ b/xlators/storage/posix/src/posix-common.c
@@ -1109,7 +1109,7 @@ posix_fini(xlator_t *this)
return;
}
-struct volume_options options[] = {
+struct volume_options posix_options[] = {
{.key = {"o-direct"}, .type = GF_OPTION_TYPE_BOOL},
{.key = {"directory"},
.type = GF_OPTION_TYPE_PATH,
@@ -1336,4 +1336,5 @@ struct volume_options options[] = {
"are stored in xattr to keep it consistent across replica and "
"distribute set. The time attributes stored at the backend are "
"not considered "},
- {.key = {NULL}}};
+ {.key = {NULL}},
+};
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 7aa9d5026ba..d6a20135f96 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -17,10 +17,10 @@
#include <glusterfs/xlator.h>
#include "posix.h"
-class_methods_t class_methods = {.init = posix_init,
- .fini = posix_fini,
- .reconfigure = posix_reconfigure,
- .notify = posix_notify};
+int32_t
+mem_acct_init(xlator_t *this);
+
+extern struct volume_options posix_options[];
struct xlator_dumpops dumpops = {
.priv = posix_priv,
@@ -78,6 +78,23 @@ struct xlator_fops fops = {
.put = posix_put,
};
-struct xlator_cbks cbks = {.release = posix_release,
- .releasedir = posix_releasedir,
- .forget = posix_forget};
+struct xlator_cbks cbks = {
+ .release = posix_release,
+ .releasedir = posix_releasedir,
+ .forget = posix_forget,
+};
+
+xlator_api_t xlator_api = {
+ .init = posix_init,
+ .fini = posix_fini,
+ .notify = posix_notify,
+ .reconfigure = posix_reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .dumpops = &dumpops,
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = posix_options,
+ .identifier = "posix",
+ .category = GF_MAINTAINED,
+};
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index 33f2c19324c..38e48b8ced3 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -2303,7 +2303,7 @@ err:
return -1;
}
-int
+void
fini(xlator_t *this)
{
struct posix_acl_conf *conf = NULL;
@@ -2311,7 +2311,7 @@ fini(xlator_t *this)
conf = this->private;
if (!conf)
- return 0;
+ return;
this->private = NULL;
minacl = conf->minimal_acl;
@@ -2328,7 +2328,7 @@ fini(xlator_t *this)
GF_FREE(conf);
- return 0;
+ return;
}
struct xlator_fops fops = {
@@ -2372,3 +2372,16 @@ struct volume_options options[] = {
},
{.key = {NULL}},
};
+
+xlator_api_t xlator_api = {
+ .init = init,
+ .fini = fini,
+ .reconfigure = reconfigure,
+ .mem_acct_init = mem_acct_init,
+ .op_version = {1}, /* Present from the initial version */
+ .fops = &fops,
+ .cbks = &cbks,
+ .options = options,
+ .identifier = "access-control",
+ .category = GF_MAINTAINED,
+};