module/error: remove legacy config support

This patch removes legacy config support in error bdev module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I348c19f560057b46030aa03adcca073f0906de0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4623
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
Tomasz Zawadzki 2020-10-12 06:55:13 -04:00
parent 5f14cec828
commit c4a95932a1
2 changed files with 1 additions and 46 deletions

View File

@ -125,10 +125,10 @@ DEPDIRS-sock_uring := log sock util
# module/bdev
DEPDIRS-bdev_gpt := bdev conf json log thread util
DEPDIRS-bdev_error := $(BDEV_DEPS)
DEPDIRS-bdev_lvol := $(BDEV_DEPS) lvol blob blob_bdev
DEPDIRS-bdev_rpc := $(BDEV_DEPS)
DEPDIRS-bdev_error := $(BDEV_DEPS_CONF)
DEPDIRS-bdev_malloc := $(BDEV_DEPS_CONF) accel
DEPDIRS-bdev_split := $(BDEV_DEPS_CONF)

View File

@ -37,7 +37,6 @@
#include "spdk/stdinc.h"
#include "spdk/rpc.h"
#include "spdk/conf.h"
#include "spdk/util.h"
#include "spdk/endian.h"
#include "spdk/nvme_spec.h"
@ -418,51 +417,7 @@ vbdev_error_config_remove(const char *base_bdev_name)
static int
vbdev_error_init(void)
{
struct spdk_conf_section *sp;
struct spdk_vbdev_error_config *cfg;
const char *base_bdev_name;
int i, rc;
sp = spdk_conf_find_section(NULL, "BdevError");
if (sp == NULL) {
return 0;
}
for (i = 0; ; i++) {
if (!spdk_conf_section_get_nval(sp, "BdevError", i)) {
break;
}
base_bdev_name = spdk_conf_section_get_nmval(sp, "BdevError", i, 0);
if (!base_bdev_name) {
SPDK_ERRLOG("ErrorInjection configuration missing bdev name\n");
rc = -EINVAL;
goto error;
}
cfg = calloc(1, sizeof(*cfg));
if (!cfg) {
SPDK_ERRLOG("calloc() failed for vbdev_error_config\n");
rc = -ENOMEM;
goto error;
}
cfg->base_bdev = strdup(base_bdev_name);
if (!cfg->base_bdev) {
free(cfg);
SPDK_ERRLOG("strdup() failed for bdev name\n");
rc = -ENOMEM;
goto error;
}
TAILQ_INSERT_TAIL(&g_error_config, cfg, tailq);
}
return 0;
error:
vbdev_error_clear_config();
return rc;
}
static void