From 029687e82ab8e98f332d0d9d23528a9621d13518 Mon Sep 17 00:00:00 2001
From: Christopher Haine <chaine@hpe.com>
Date: Tue, 23 Nov 2021 13:23:30 +0000
Subject: [PATCH] fix guided io hint logic

---
 transport/mio.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/transport/mio.c b/transport/mio.c
index e4832894..90aa4f78 100644
--- a/transport/mio.c
+++ b/transport/mio.c
@@ -157,8 +157,9 @@ int hints_attributes_set(struct mio_hints* hints, mstro_cdo_attributes attr)
     s = mstro_attribute_dict_get(attr,
                                  ".maestro.core.cdo.mio.hint.where",
                                  &vt, &hint_where_ptr, NULL, false);
-    if(s==MSTRO_NOENT && vt==MSTRO_CDO_ATTR_VALUE_INVALID) {
+    if(s==MSTRO_NOENT && vt==MSTRO_CDO_ATTR_VALUE_NONE) {
       DEBUG("No `WHERE` mio hint set\n");
+      goto HINT_HOT;
     }
     if(s!=MSTRO_OK) {
       ERR("Failed to check `WHERE` mio hint on CDO\n");
@@ -172,13 +173,14 @@ int hints_attributes_set(struct mio_hints* hints, mstro_cdo_attributes attr)
     } else {
       DEBUG("Set MIO WHERE to %d\n", hint_where);
     }
-
+HINT_HOT: ;
     const void *hint_hot_ptr=NULL;
     s = mstro_attribute_dict_get(attr,
                                  ".maestro.core.cdo.mio.hint.hot-index",
                                  &vt, &hint_hot_ptr, NULL, false);
-    if(s==MSTRO_NOENT && vt==MSTRO_CDO_ATTR_VALUE_INVALID) {
+    if(s==MSTRO_NOENT && vt==MSTRO_CDO_ATTR_VALUE_NONE) {
       DEBUG("No `HOT-INDEX` mio hint set\n");
+      goto BAILOUT;
     }
     if(s!=MSTRO_OK) {
       ERR("Failed to check `HOT-INDEX` mio hint on CDO\n");
@@ -192,7 +194,7 @@ int hints_attributes_set(struct mio_hints* hints, mstro_cdo_attributes attr)
     } else {
       DEBUG("Set MIO HOT INDEX to %d\n", hint_hot);
     }
-
+BAILOUT:
   return 0;
 }
 
-- 
GitLab