device-mapper-multipath/0001-kpartx-Use-absolute-paths-to-create-mappings.patch
Benjamin Marzinski 996407fc5f device-mapper-multipath-0.7.7-7.gitb80318b
Update Source to latest upstream commit
Rename files
  * Previous patches 0001-0020 are now patches 0002-0021
  * Previous patches 0021-0028 are now patches 0026-0033
Add 0001-kpartx-Use-absolute-paths-to-create-mappings.patch
Add 0022-multipathd-check-for-NULL-udevice-in-cli_add_path.patch
Add 0023-libmultipath-remove-max_fds-code-duplication.patch
Add 0024-multipathd-set-return-code-for-multipathd-commands.patch
Add 0025-mpathpersist-fix-registration-rollback-issue.patch
  * The above 5 patches have been submitted upstream
2018-10-10 00:16:58 -05:00

38 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@redhat.com>
Date: Sat, 6 Oct 2018 09:38:56 +0200
Subject: [PATCH] kpartx: Use absolute paths to create mappings
kpartx -d now uses absolute paths to delete mappings, since the
commit 9bdfa3eb8e24b668e6c2bb882cddb0ccfe23ed5b. We should use
those same absolute paths to create the mappings.
Without this patch, the following workflow (as seen in the
manual page for kpartx) fails to actually remove the devices:
# kpartx -av disk.img
...
# kpartx -d disk.img
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
kpartx/kpartx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 442b6bd..d4fb53b 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -341,7 +341,7 @@ main(int argc, char **argv){
if (!loopdev) {
loopdev = find_unused_loop_device();
- if (set_loop(loopdev, device, 0, &ro)) {
+ if (set_loop(loopdev, rpath, 0, &ro)) {
fprintf(stderr, "can't set up loop\n");
exit (1);
}
--
2.7.4