diff --git a/attributes/maestro-schema.c b/attributes/maestro-schema.c index 3cf0543d65d9501bc333a3194f11ea4a627b449f..5eaa722c0333fc6e65152b731f6dcacb3efb9ede 100644 --- a/attributes/maestro-schema.c +++ b/attributes/maestro-schema.c @@ -2713,11 +2713,6 @@ mstro_attribute_dict_set_kventry(mstro_attribute_dict dict, MSTRO_CDO_ATTR_VALUE_timestamp, &ts, true); } case MSTRO__POOL__AVAL__VAL_MMB_LAYOUT: { - /**FIXME support other mmbLayout types */ - if(aval->mmblayout->type != MSTRO__POOL__MMBLAYOUT__MMB_LAYOUT_TYPE__MMB_IRREGULAR){ - ERR("Unsupported mmbLayout type \n"); - return MSTRO_UNIMPL; - } mmbLayout *dist_layout; mstro_attribute_pool_aval_to_mmbLayout(aval->mmblayout, &dist_layout); diff --git a/maestro/pool_manager_registry.c b/maestro/pool_manager_registry.c index 9439e041c63f6af13abc6c24961806ab4a1057da..1ddae712ff49b7bc7ada575b0e7fca46ad8be661 100644 --- a/maestro/pool_manager_registry.c +++ b/maestro/pool_manager_registry.c @@ -1700,58 +1700,22 @@ mstro_pm_cdo_registry_find(mstro_app_id app, const struct mstro_cdo_id *id) } mstro_status -mstro_pm_cdo_registry_store_dist_layout(struct cdo_handle_entry *e, - Mstro__Pool__Attributes *attributes) +mstro_pm_cdo_registry_attributes_to_dist_layout(Mstro__Pool__Attributes *attributes, mmbLayout **dist_layout) { mstro_status status = MSTRO_OK; size_t n = attributes->kv_map->n_map; - /*declare and init all dist layout variables */ - bool dist = false; - size_t *offsets = NULL; - size_t *sizes = NULL; - size_t element_size_bytes = 0; - size_t index = -1; - size_t n_blocks = 0; - int n_req_attribs = 0; - mmbLayout *dist_layout; DEBUG("looking for distributed layout among %d attributes \n", n); const char *key; for(size_t i=0; i<n; i++) { key = attributes->kv_map->map[i]->key; - ERR("key len: %d (%s)\n", strlen(key), key); - if(strcmp(key,".maestro.core.cdo.isdistributed")==0) { - dist = attributes->kv_map->map[i]->val->bool_; - ERR("dist = %d \n", dist ); - } else if(strcmp(key,".maestro.core.cdo.dist-layout")==0) { - ERR("DIST Layout found ... \n\n\n"); - size_t n = (size_t) attributes->kv_map->map[i]->val->mmblayout->irregular->n_blocks; - ERR("layout type %d \n ", attributes->kv_map->map[i]->val->mmblayout->type); - ERR("layout index %"PRIu64" \n ", attributes->kv_map->map[i]->val->mmblayout->index); - ERR("nblocks %zu \n", n); - for (size_t k = 0; k < n; k++) { - ERR("offsets[%zu] = %"PRIu64", lengths[%zu] = %"PRIu64" \n", k, - attributes->kv_map->map[i]->val->mmblayout->irregular->offsets[k], - k, - attributes->kv_map->map[i]->val->mmblayout->irregular->lengths[k]); - } - n_req_attribs++; + if(strcmp(key,".maestro.core.cdo.dist-layout")==0) { + DEBUG("DIST Layout found ... \n\n\n"); + status = mstro_attribute_pool_aval_to_mmbLayout(attributes->kv_map->map[i]->val->mmblayout, dist_layout); + break; } } - if(dist) - { - ERR("DIST CDO !!!!!! \n\n\n\n"); - if (n_req_attribs != 2) - { - ERR("Found only %d out of 2 required dist attributes", n_req_attribs); - } - - } - else { - ERR("NOT DIST CDO !!!! \n\n\n"); - } - return status; }