diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 68920d888..7632ae4fd 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.181 - =================================== + Fix bug in construction of cache table line (regression from 1.02.159). Version 1.02.179 - 11th August 2021 =================================== diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c index c759c4e46..4f2d79ee1 100644 --- a/device_mapper/libdm-deptree.c +++ b/device_mapper/libdm-deptree.c @@ -2644,7 +2644,7 @@ static int _cache_emit_segment_line(struct dm_task *dmt, EMIT_PARAMS(pos, " %s", name); /* Do not pass migration_threshold 2048 which is default */ - EMIT_PARAMS(pos, " %u", (seg->policy_argc + (seg->migration_threshold != 2048) ? 1 : 0) * 2); + EMIT_PARAMS(pos, " %u", (seg->policy_argc + ((seg->migration_threshold != 2048) ? 1 : 0)) * 2); if (seg->migration_threshold != 2048) EMIT_PARAMS(pos, " migration_threshold %u", seg->migration_threshold); if (seg->policy_settings) diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 06ebdc0c0..881558e44 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -2489,7 +2489,7 @@ static int _cache_emit_segment_line(struct dm_task *dmt, EMIT_PARAMS(pos, " %s", name); /* Do not pass migration_threshold 2048 which is default */ - EMIT_PARAMS(pos, " %u", (seg->policy_argc + (seg->migration_threshold != 2048) ? 1 : 0) * 2); + EMIT_PARAMS(pos, " %u", (seg->policy_argc + ((seg->migration_threshold != 2048) ? 1 : 0)) * 2); if (seg->migration_threshold != 2048) EMIT_PARAMS(pos, " migration_threshold %u", seg->migration_threshold); if (seg->policy_settings)