bmaptool: add 3 fixes
PATCH 1/1 bmaptool: add 3 fixes
I found a couple issues with bmaptool, including a race condition, which I have fixed and submitted upstream. This patch adds these fixes to the project now while waiting for feedback and a new release:
BmapCopy.py: fix error message CLI.py: fix block device udev race condition BmapCopy.py: tweak suggested udev rule
Signed-off-by Trevor Woerner <[email protected]>
--- .../bmap-tools/bmap-tools_git.bb | 7 +- .../0001-BmapCopy.py-fix-error-message.patch | 36 ++++++++ ...fix-block-device-udev-race-condition.patch | 83 +++++++++++++++++++ ...mapCopy.py-tweak-suggested-udev-rule.patch | 43 ++++++++++ 4 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/bmap-tools/files/0001-BmapCopy.py-fix-error-message.patch create mode 100644 meta/recipes-support/bmap-tools/files/0002-CLI.py-fix-block-device-udev-race-condition.patch create mode 100644 meta/recipes-support/bmap-tools/files/0003-BmapCopy.py-tweak-suggested-udev-rule.patch
meta/recipes-support/bmap-tools/bmap-tools_git.bb +6 -1
@@ -9,7 +9,12 @@ SECTION = "console/utils" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://github.com/intel/${BPN};branch=main;protocol=https" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +SRC_URI = "git://github.com/intel/${BPN};branch=main;protocol=https \ + file://0001-BmapCopy.py-fix-error-message.patch \ + file://0002-CLI.py-fix-block-device-udev-race-condition.patch \ + file://0003-BmapCopy.py-tweak-suggested-udev-rule.patch \ + " SRCREV = "d84a6fd202fe246a0bc19ed2082e41bcdd75fb13" S = "${WORKDIR}/git"
meta/recipes-support/bmap-tools/files/0001-BmapCopy.py-fix-error-message.patch new file +36 -0
@@ -0,0 +1,36 @@ +From ad0b0513a46c7d238d0fdabee0267c7084b75e84 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner <[email protected]> +Date: Thu, 11 Jan 2024 22:04:23 -0500 +Subject: [PATCH 1/3] BmapCopy.py: fix error message + +The wrong variable was being used when attempting to print out an informative +message to the user. Leading to nonsense messages such as: + + bmaptool: info: failed to enable I/O optimization, expect suboptimal speed (reason: cannot switch to the 1 I/O scheduler: 1 in use. None) + +Upstream-Status: Submitted [https://github.com/intel/bmap-tools/pull/129] +Signed-off-by: Trevor Woerner <[email protected]> +--- + bmaptools/BmapCopy.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py +index 9de7ef434233..b1e8e0fcbdb7 100644 +--- a/bmaptools/BmapCopy.py ++++ b/bmaptools/BmapCopy.py +@@ -892,9 +892,9 @@ class BmapBdevCopy(BmapCopy): + _log.info( + "failed to enable I/O optimization, expect " + "suboptimal speed (reason: cannot switch to the " +- f"{max_ratio_chg.temp_value} I/O scheduler: " +- f"{max_ratio_chg.old_value or 'unknown scheduler'} in use. " +- f"{max_ratio_chg.error})" ++ f"'{scheduler_chg.temp_value}' I/O scheduler: " ++ f"'{scheduler_chg.old_value or 'unknown scheduler'}' in use. " ++ f"{scheduler_chg.error})" + ) + if max_ratio_chg.error or scheduler_chg.error: + _log.info( +-- +2.43.0.76.g1a87c842ece3 +
meta/recipes-support/bmap-tools/files/0002-CLI.py-fix-block-device-udev-race-condition.patch new file +83 -0
83 lines not on this page · raw message
meta/recipes-support/bmap-tools/files/0003-BmapCopy.py-tweak-suggested-udev-rule.patch new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
2.43.0.76.g1a87c842ece3