device-mapper-multipath/0057-libmultipath-deal-with-flushing-no-maps.patch
Benjamin Marzinski 9abdc502cf device-mapper-multipath-0.8.4-4
Rebased on top of additional commits staged for upstream
  * Previous patches 0048-0060 are now patches 0053-0054 & 0059-0069
Add 0048-libmultipath-add-device-to-hwtable.c.patch
Add 0049-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch
Add 0050-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch
Add 0051-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch
Add 0052-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch
Add 0055-libmultipath-remove-code-duplication-in-path-countin.patch
Add 0056-libmultipath-count-pending-paths-as-active-on-loads.patch
Add 0057-libmultipath-deal-with-flushing-no-maps.patch
Add 0058-multipath-deal-with-delegation-failures-correctly.patch
Add 0070-multipath-add-libmpathvalid-library.patch
  * adds the libmpathvalid.so library to determine if devices are
    valid multipath paths.
Add 0071-libmultipath-add-uid-failback-for-dasd-devices.patch
Add 0072-libmultipath-add-ignore_udev_uid-option.patch
2020-07-21 17:39:38 -05:00

34 lines
998 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Tue, 21 Jul 2020 01:28:22 -0500
Subject: [PATCH] libmultipath: deal with flushing no maps
dm_flush_maps() was failing if there were no device-mapper devices at
all, instead of returning success, since there is nothing to do.
Fixes: "libmultipath: make dm_flush_maps only return 0 on success"
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/devmapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index 126cd728..b8199cb5 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -1024,10 +1024,10 @@ int dm_flush_maps (int need_suspend, int retries)
if (!(names = dm_task_get_names (dmt)))
goto out;
+ r = 0;
if (!names->dev)
goto out;
- r = 0;
do {
if (need_suspend)
r |= dm_suspend_and_flush_map(names->name, retries);
--
2.17.2