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 <[email protected]> --- drivers/md/dm-ps-historical-service-time.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-ps-historical-service-time.c b/drivers/md/dm-ps-historical-service-time.c index e6324424d23a..e0103eefe28f 100644 --- a/drivers/md/dm-ps-historical-service-time.c +++ b/drivers/md/dm-ps-historical-service-time.c @@ -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) { -- 2.53.0
