dm-mpath: standardize repeat_count handling in the HST path selector

The Historical Service Time path selector ignores the repeat_count
argument just like all the other path selectors. But all of the other
path_selectors explicitly print a warning message when the repeat_count
is set greater than 1. Also, all of the other selectors print 1 for the
repeat_count when printing the table. Standardize the HST path selector
to match.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
Benjamin Marzinski 2026-10-08 16:28:08 -04:00 committed by Mikulas Patocka
parent fe9d8c26ab
commit eba776a4d9

View File

@ -31,7 +31,7 @@
#define DM_MSG_PREFIX "multipath historical-service-time"
#define HST_MIN_IO 1
#define HST_VERSION "0.1.1"
#define HST_VERSION "0.2.0"
#define HST_FIXED_SHIFT 10 /* 10 bits of decimal precision */
#define HST_FIXED_MAX (ULLONG_MAX >> HST_FIXED_SHIFT)
@ -216,7 +216,7 @@ static int hst_status(struct path_selector *ps, struct dm_path *path,
pi->outstanding, pi->stale_after);
break;
case STATUSTYPE_TABLE:
DMEMIT("0 ");
DMEMIT("%u ", pi->repeat_count);
break;
case STATUSTYPE_IMA:
*result = '\0';
@ -251,6 +251,11 @@ static int hst_add_path(struct path_selector *ps, struct dm_path *path,
return -EINVAL;
}
if (repeat_count > 1) {
DMWARN_LIMIT("repeat_count > 1 is deprecated, using 1 instead");
repeat_count = 1;
}
/* allocate the path */
pi = kmalloc_obj(*pi);
if (!pi) {