diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 55c7ebfbd..5f13b3018 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -1935,6 +1935,9 @@ static int _dev_manager_vdo_pool_message_stats(struct dev_manager *dm, { "logicalBlocksUsed", &status->logical_blocks_used } }; + for (i = 0; i < DM_ARRAY_SIZE(vme); ++i) + *vme[i].val = ULLONG_MAX; + if (!(dlid = build_dm_uuid(dm->mem, lv, lv_layer(lv)))) return_0; @@ -1957,9 +1960,11 @@ static int _dev_manager_vdo_pool_message_stats(struct dev_manager *dm, !(p = strchr(p, ':')) || ((*vme[i].val = strtoul(p + 1, NULL, 10)) == ULLONG_MAX) || errno) { log_debug("Cannot parse %s in VDO DM stats message.", vme[i].name); - *vme[i].val = 0; + *vme[i].val = ULLONG_MAX; goto out; } + if (*vme[i].val != ULLONG_MAX) + log_debug("VDO property %s = " FMTu64, vme[i].name, *vme[i].val); } } diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c index 9930d057d..6668fe45a 100644 --- a/lib/metadata/vdo_manip.c +++ b/lib/metadata/vdo_manip.c @@ -217,10 +217,10 @@ int parse_vdo_pool_status(struct dm_pool *mem, const struct logical_volume *vdo_ status->vdo = result.status; if ((result.status->operating_mode == DM_VDO_MODE_NORMAL) && - (status->data_blocks_used || + ((status->data_blocks_used != ULLONG_MAX) || _sysfs_get_kvdo_value(dm_name, dminfo, "statistics/data_blocks_used", &status->data_blocks_used)) && - (status->logical_blocks_used || + ((status->logical_blocks_used != ULLONG_MAX) || _sysfs_get_kvdo_value(dm_name, dminfo, "statistics/logical_blocks_used", &status->logical_blocks_used))) { status->usage = dm_make_percent(result.status->used_blocks,