[RFC PATCH 2/3] fs/resctrl: Use correct schema name in bw_validate() last_cmd_status messages
From: Ben Horgan
Date: Mon Sep 21 2026 - 10:03:20 EST
As bw_validate() is now used for all scalar controls update the
last_cmd_status messages to display the actual schema name rather than
unconditionally using "MB".
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
fs/resctrl/ctrlmondata.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
index efeb36e0db25..968eb04046e9 100644
--- a/fs/resctrl/ctrlmondata.c
+++ b/fs/resctrl/ctrlmondata.c
@@ -131,7 +131,8 @@ static bool bw_validate(char *buf, u32 *data, struct rdt_resource *r,
ret = kstrtou32(buf, 10, &bw);
if (ret) {
- rdt_last_cmd_printf("Invalid MB value %s\n", buf);
+ rdt_last_cmd_printf("Invalid %s value %s\n", ctrl->schema_name, buf);
+
return false;
}
@@ -142,8 +143,9 @@ static bool bw_validate(char *buf, u32 *data, struct rdt_resource *r,
}
if (bw < ctrl->scalar.min || bw > ctrl->scalar.max) {
- rdt_last_cmd_printf("MB value %u out of range [%d,%d]\n",
- bw, ctrl->scalar.min, ctrl->scalar.max);
+ rdt_last_cmd_printf("%s value %u out of range [%d,%d]\n",
+ ctrl->schema_name, bw, ctrl->scalar.min, ctrl->scalar.max);
+
return false;
}
--
2.43.0