| Patrick Williams | 56b44a9 | 2024-01-19 08:49:29 -0600 | [diff] [blame] | 1 | From ad0b0513a46c7d238d0fdabee0267c7084b75e84 Mon Sep 17 00:00:00 2001 | 
|  | 2 | From: Trevor Woerner <twoerner@gmail.com> | 
|  | 3 | Date: Thu, 11 Jan 2024 22:04:23 -0500 | 
|  | 4 | Subject: [PATCH 1/3] BmapCopy.py: fix error message | 
|  | 5 |  | 
|  | 6 | The wrong variable was being used when attempting to print out an informative | 
|  | 7 | message to the user. Leading to nonsense messages such as: | 
|  | 8 |  | 
|  | 9 | bmaptool: info: failed to enable I/O optimization, expect suboptimal speed (reason: cannot switch to the 1 I/O scheduler: 1 in use. None) | 
|  | 10 |  | 
|  | 11 | Upstream-Status: Submitted [https://github.com/intel/bmap-tools/pull/129] | 
|  | 12 | Signed-off-by: Trevor Woerner <twoerner@gmail.com> | 
|  | 13 | --- | 
|  | 14 | bmaptools/BmapCopy.py | 6 +++--- | 
|  | 15 | 1 file changed, 3 insertions(+), 3 deletions(-) | 
|  | 16 |  | 
|  | 17 | diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py | 
|  | 18 | index 9de7ef434233..b1e8e0fcbdb7 100644 | 
|  | 19 | --- a/bmaptools/BmapCopy.py | 
|  | 20 | +++ b/bmaptools/BmapCopy.py | 
|  | 21 | @@ -892,9 +892,9 @@ class BmapBdevCopy(BmapCopy): | 
|  | 22 | _log.info( | 
|  | 23 | "failed to enable I/O optimization, expect " | 
|  | 24 | "suboptimal speed (reason: cannot switch to the " | 
|  | 25 | -                    f"{max_ratio_chg.temp_value} I/O scheduler: " | 
|  | 26 | -                    f"{max_ratio_chg.old_value or 'unknown scheduler'} in use. " | 
|  | 27 | -                    f"{max_ratio_chg.error})" | 
|  | 28 | +                    f"'{scheduler_chg.temp_value}' I/O scheduler: " | 
|  | 29 | +                    f"'{scheduler_chg.old_value or 'unknown scheduler'}' in use. " | 
|  | 30 | +                    f"{scheduler_chg.error})" | 
|  | 31 | ) | 
|  | 32 | if max_ratio_chg.error or scheduler_chg.error: | 
|  | 33 | _log.info( | 
|  | 34 | -- | 
|  | 35 | 2.43.0.76.g1a87c842ece3 | 
|  | 36 |  |