From c2e8a5432ad7de789e2449065353d1d17e1e3ca9 Mon Sep 17 00:00:00 2001 From: Christopher Haine <chaine@hpe.com> Date: Tue, 23 Nov 2021 17:08:55 +0000 Subject: [PATCH] implicit MIO transport if guided IO attribute set --- maestro/pool_client.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/maestro/pool_client.c b/maestro/pool_client.c index b27ea292..cc8e1c62 100644 --- a/maestro/pool_client.c +++ b/maestro/pool_client.c @@ -456,6 +456,22 @@ mstro_pc__handle_initiate_transfer(const Mstro__Pool__InitiateTransfer* init) DEBUG("Source CDO empty, doing NULL transfer\n"); realsize = 0; } + + mstro_status swhere=MSTRO_UNIMPL; + mstro_status shot=MSTRO_UNIMPL; + const void *hint_where_ptr=NULL; + swhere = mstro_attribute_dict_get(src_cdo->attributes, + ".maestro.core.cdo.mio.hint.where", + &vt, &hint_where_ptr, NULL, false); + const void *hint_hot_ptr=NULL; + shot = mstro_attribute_dict_get(src_cdo->attributes, + ".maestro.core.cdo.mio.hint.hot-index", + &vt, &hint_hot_ptr, NULL, false); + if (swhere == MSTRO_OK || shot == MSTRO_OK) { + init->methods->supported[0] = MSTRO__POOL__TRANSPORT_KIND__MIO; + DEBUG("MIO guided IO attribute set, implicitly switching to MIO transport\n"); + } + if ( init->methods->supported[0] == MSTRO__POOL__TRANSPORT_KIND__MIO && (!g_mio_available || (realsize % getpagesize()) != 0 ) ){ -- GitLab