Lines Matching defs:core
89 free(vbdev->core.name);
199 remove_base_bdev(&vbdev->core);
212 /* Try to lock cache, then remove core */
228 /* Detach core base */
386 /* Clean remove case - remove core and then cache, this order
391 if (vbdev->core.attached) {
402 /* Dirty shutdown/hot remove case - remove cache and then core, this order
412 if (vbdev->core.attached) {
430 /* Prevent before detach cache/core during register path of
522 if (vbdev->core.name && strcmp(vbdev->core.name, name) == 0) {
523 return &vbdev->core;
706 return spdk_bdev_io_type_supported(vbdev->core.bdev, io_type);
729 spdk_json_write_named_string(w, "core_device", vbdev->core.name);
757 spdk_json_write_named_string(w, "core_bdev_name", vbdev->core.name);
844 qctx->core_ch = spdk_bdev_get_io_channel(vbdev->core.desc);
930 vbdev->exp_bdev.blocklen = vbdev->core.bdev->blocklen;
931 vbdev->exp_bdev.write_cache = vbdev->core.bdev->write_cache;
932 vbdev->exp_bdev.required_alignment = vbdev->core.bdev->required_alignment;
937 vbdev->exp_bdev.blockcnt = vbdev->core.bdev->blockcnt;
945 (const char *)&vbdev->core.bdev->uuid, sizeof(struct spdk_uuid));
969 add_core_cmpl(ocf_cache_t cache, ocf_core_t core, void *priv, int error)
976 SPDK_ERRLOG("Error %d, failed to add core device to cache instance %s,"
981 vbdev->ocf_core = core;
987 /* Try to lock cache, then add core */
998 ocf_mngt_cache_add_core(vbdev->ocf_cache, &vbdev->cfg.core, add_core_cmpl, vbdev);
1001 /* Add core for existing OCF cache instance */
1069 uint32_t core_block_size = vbdev->core.bdev->blocklen;
1078 SPDK_ERRLOG("Cache bdev block size (%d) is bigger then core bdev block size (%d)\n",
1142 if (!(vbdev->core.attached && vbdev->cache.attached) || vbdev->state.started) {
1155 * for core and cache devices */
1168 ocf_mngt_core_config_set_default(&cfg->core);
1174 ret = snprintf(cfg->core.name, sizeof(cfg->core.name), "%s", vbdev->core.name);
1175 if (ret < 0 || (size_t) ret >= sizeof(cfg->core.name)) {
1185 cfg->core.volume_type = SPDK_OBJECT;
1189 * otherwise OCF will interpret this core as new
1191 vbdev->cfg.core.try_add = true;
1199 * Core UUID is a triple of (core name, vbdev name, cache name)
1215 vbdev->core.name, vbdev->name, vbdev->cache.name);
1216 cfg->core.uuid.size = strlen(vbdev->uuid) + 1;
1217 cfg->core.uuid.data = vbdev->uuid;
1218 vbdev->uuid[strlen(vbdev->core.name)] = 0;
1219 vbdev->uuid[strlen(vbdev->core.name) + 1 + strlen(vbdev->name)] = 0;
1256 vbdev->core.name = strdup(core_name);
1257 if (!vbdev->core.name) {
1262 vbdev->core.parent = vbdev;
1264 vbdev->core.is_cache = false;
1361 SPDK_NOTICELOG("Deinitializing '%s' because its core device '%s' was removed\n",
1461 vbdev->core.bdev = core_bdev;
1462 rc |= attach_base(&vbdev->core);
1501 SPDK_NOTICELOG("OCF bdev '%s' is waiting for core device '%s' to connect\n",
1607 if (!strcmp(bdev_name, vbdev->core.name)) {
1717 if (!strcmp(bdev_name, vbdev->core.name)) {
1734 * Then we get UUIDs of core devices an create configurations based on them */