diff options
| author | Amar Tumballi <amarts@redhat.com> | 2018-11-28 10:05:39 +0530 | 
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2018-12-06 07:54:28 +0000 | 
| commit | 340e58f9b3bcdfe4314da65e592dcd5c2daf6fd9 (patch) | |
| tree | e5e403711221b488ed6c4ee72322e2657d9065f8 /xlators/performance | |
| parent | 7ea5f438f60df9aa16027030f2b24f31bc07524b (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/performance')
| -rw-r--r-- | xlators/performance/decompounder/src/decompounder.c | 18 | ||||
| -rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 14 | ||||
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 15 | ||||
| -rw-r--r-- | xlators/performance/open-behind/src/open-behind.c | 14 | ||||
| -rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 14 | ||||
| -rw-r--r-- | xlators/performance/readdir-ahead/src/readdir-ahead.c | 13 | ||||
| -rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 14 | 
7 files changed, 99 insertions, 3 deletions
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, +};  | 
