From 814ad20d2d82c8bc317128078cbaba16a2f1687f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 17 2017 15:26:11 +0000 Subject: import device-mapper-multipath-0.4.9-99.el7_3.1 --- diff --git a/SOURCES/0189-RHBZ-1395298-rbd-lock-on-read.patch b/SOURCES/0189-RHBZ-1395298-rbd-lock-on-read.patch new file mode 100644 index 0000000..584d37f --- /dev/null +++ b/SOURCES/0189-RHBZ-1395298-rbd-lock-on-read.patch @@ -0,0 +1,38 @@ +--- + libmultipath/checkers/rbd.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +Index: multipath-tools-130222/libmultipath/checkers/rbd.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/checkers/rbd.c ++++ multipath-tools-130222/libmultipath/checkers/rbd.c +@@ -45,6 +45,7 @@ struct rbd_checker_context { + char *username; + int remapped; + int blacklisted; ++ int lock_on_read:1; + + rados_t cluster; + +@@ -141,6 +142,9 @@ int libcheck_init(struct checker * c) + goto free_addr; + } + ++ if (strstr(config_info, "lock_on_read")) ++ ct->lock_on_read = 1; ++ + ct->config_info = strdup(config_info); + if (!ct->config_info) + goto free_addr; +@@ -397,7 +401,10 @@ static int rbd_remap(struct rbd_checker_ + case 0: + argv[i++] = "rbd"; + argv[i++] = "map"; +- argv[i++] = "-o noshare"; ++ if (ct->lock_on_read) ++ argv[i++] = "-o noshare,lock_on_read"; ++ else ++ argv[i++] = "-o noshare"; + if (ct->username) { + argv[i++] = "--id"; + argv[i++] = ct->username; diff --git a/SPECS/device-mapper-multipath.spec b/SPECS/device-mapper-multipath.spec index afe42c1..03eca57 100644 --- a/SPECS/device-mapper-multipath.spec +++ b/SPECS/device-mapper-multipath.spec @@ -1,7 +1,7 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.4.9 -Release: 99%{?dist} +Release: 99%{?dist}.1 License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -196,6 +196,7 @@ Patch0185: 0185-rbd-check-for-nonshared-clients.patch Patch0186: 0186-rbd-check-for-exclusive-lock-enabled.patch Patch0187: 0187-rbd-fixup-log-messages.patch Patch0188: 0188-RHBZ-1368501-dont-exit.patch +Patch0189: 0189-RHBZ-1395298-rbd-lock-on-read.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -439,6 +440,7 @@ kpartx manages partition creation and removal for device-mapper devices. %patch0186 -p1 %patch0187 -p1 %patch0188 -p1 +%patch0189 -p1 cp %{SOURCE1} . %build @@ -533,6 +535,11 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||: %{_mandir}/man8/kpartx.8.gz %changelog +* Wed Sep 7 2016 Benjamin Marzinski 0.4.9-99.1 +- Add 0189-RHBZ-1395298-rbd-lock-on-read.patch + * pass lock_on_read when remapping image +- Resolves: bz #1395298 + * Wed Sep 7 2016 Benjamin Marzinski 0.4.9-99 - Add 0188-RHBZ-1368501-dont-exit.patch * make multipathd not exit if it encounters recoverable errors on startup