Skip to contentSkip to conversation

Change misleading error message for invalid size= value

PATCH Applied Jakub Sitnicki 2 participants 2 messages Dec 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change misleading error message for invalid size= value

The error message refers to the IO size, yet another parameter, but we actually compare the size parameter value against the block size.

Change the message to reflect the code, and make it easier for the user to see what values are we comparing.

---
 init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
init.c +2 -1
index 382fa1f..36feb51 100644
@@ -822,7 +822,8 @@ static int fixup_options(struct thread_data *td)
 	 * If size is set but less than the min block size, complain
 	 */
 	if (o->size && o->size < td_min_bs(td)) {
-		log_err("fio: size too small, must be larger than the IO size: %llu\n", (unsigned long long) o->size);
+		log_err("fio: size too small, must not be less than minimum block size: %llu < %u\n",
+			(unsigned long long) o->size, td_min_bs(td));
 		ret = 1;
 	}
 
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 16 lines · Jakub Sitnicki

The error message refers to the IO size, yet another parameter, but we actually compare the size parameter value against the block size.

Change the message to reflect the code, and make it easier for the user to see what values are we comparing.

---
 init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
init.c +0 -0
index 382fa1f..36feb51 100644

init.c static int fixup_options(struct thread_data *td) · line 828

Quoted 8 lines
init.c +2 -1
@@ -822,7 +822,8 @@ static int fixup_options(struct thread_data *td)
 	 * If size is set but less than the min block size, complain
 	 */
 	if (o->size && o->size < td_min_bs(td)) {
-		log_err("fio: size too small, must be larger than the IO size: %llu\n", (unsigned long long) o->size);
+		log_err("fio: size too small, must not be less than minimum block size: %llu < %u\n",
+			(unsigned long long) o->size, td_min_bs(td));
 		ret = 1;
 	}

Thanks, applied.

Signature · 1 line
Jens Axboe