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
This commit is contained in:
parent
3ec0ebefcd
commit
996407fc5f
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ multipath-tools-091027.tar.gz
|
|||||||
/multipath-tools-0.7.7.tgz
|
/multipath-tools-0.7.7.tgz
|
||||||
/multipath-tools-ef6d98b.tgz
|
/multipath-tools-ef6d98b.tgz
|
||||||
/multipath-tools-1a8625a.tgz
|
/multipath-tools-1a8625a.tgz
|
||||||
|
/multipath-tools-b80318b.tgz
|
||||||
|
37
0001-kpartx-Use-absolute-paths-to-create-mappings.patch
Normal file
37
0001-kpartx-Use-absolute-paths-to-create-mappings.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
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
|
||||||
|
|
@ -5,45 +5,44 @@ Subject: [PATCH] libmultipath: fix tur checker timeout
|
|||||||
|
|
||||||
The code previously was timing out mode if ct->thread was 0 but
|
The code previously was timing out mode if ct->thread was 0 but
|
||||||
ct->running wasn't. This combination never happens. The idea was to
|
ct->running wasn't. This combination never happens. The idea was to
|
||||||
timeout if for some reason the path checker tried to kill the thread,
|
timeout if for some reason the path checker tried to cancel the thread,
|
||||||
but it didn't die. The correct thing to check for this is ct->holders.
|
but it didn't die. The correct thing to check for this is ct->holders.
|
||||||
ct->holders will always be at least one when libcheck_check() is called,
|
ct->holders will always be at least one when libcheck_check() is called,
|
||||||
since libcheck_free() won't get called until the device is no longer
|
since libcheck_free() won't get called until the device is no longer
|
||||||
being checked. So, if ct->holders is 2, that means that the tur thread
|
being checked. So, if ct->holders is 2, that means that the tur thread
|
||||||
is has not shut down yet.
|
is has not shut down yet.
|
||||||
|
|
||||||
Also, instead of returning PATH_TIMEOUT whenever the thread hasn't died,
|
Also, instead of timing out, the tur checker will switch to synchronous
|
||||||
it should only time out if the thread didn't successfully get a value,
|
mode. The chance of this code path happening is very low. I simply
|
||||||
which means the previous state was already PATH_TIMEOUT.
|
exists because the old thread must not interfere with a new thread
|
||||||
|
starting up. But if something does go very wrong, and a thread does get
|
||||||
|
stuck, this solution will keep the checker from just ignoring the device
|
||||||
|
forever.
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
---
|
---
|
||||||
libmultipath/checkers/tur.c | 15 +++++++++------
|
libmultipath/checkers/tur.c | 9 +++++----
|
||||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
||||||
index bf8486d..275541f 100644
|
index bf8486d..3c5e236 100644
|
||||||
--- a/libmultipath/checkers/tur.c
|
--- a/libmultipath/checkers/tur.c
|
||||||
+++ b/libmultipath/checkers/tur.c
|
+++ b/libmultipath/checkers/tur.c
|
||||||
@@ -355,12 +355,15 @@ int libcheck_check(struct checker * c)
|
@@ -355,12 +355,13 @@ int libcheck_check(struct checker * c)
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&ct->lock);
|
pthread_mutex_unlock(&ct->lock);
|
||||||
} else {
|
} else {
|
||||||
- if (uatomic_read(&ct->running) != 0) {
|
- if (uatomic_read(&ct->running) != 0) {
|
||||||
- /* pthread cancel failed. continue in sync mode */
|
- /* pthread cancel failed. continue in sync mode */
|
||||||
- pthread_mutex_unlock(&ct->lock);
|
|
||||||
- condlog(3, "%s: tur thread not responding",
|
|
||||||
- tur_devt(devt, sizeof(devt), ct));
|
|
||||||
- return PATH_TIMEOUT;
|
|
||||||
+ if (uatomic_read(&ct->holders) > 1) {
|
+ if (uatomic_read(&ct->holders) > 1) {
|
||||||
+ /* pthread cancel failed. If it didn't get the path
|
+ /* The thread has been cancelled but hasn't
|
||||||
+ state already, timeout */
|
+ * quilt. Fail back to synchronous mode */
|
||||||
+ if (ct->state == PATH_PENDING) {
|
pthread_mutex_unlock(&ct->lock);
|
||||||
+ pthread_mutex_unlock(&ct->lock);
|
- condlog(3, "%s: tur thread not responding",
|
||||||
+ condlog(3, "%s: tur thread not responding",
|
+ condlog(3, "%s: tur checker failing back to sync",
|
||||||
+ tur_devt(devt, sizeof(devt), ct));
|
tur_devt(devt, sizeof(devt), ct));
|
||||||
+ return PATH_TIMEOUT;
|
- return PATH_TIMEOUT;
|
||||||
+ }
|
+ return tur_check(c->fd, c->timeout, copy_msg_to_checker, c);
|
||||||
}
|
}
|
||||||
/* Start new TUR checker */
|
/* Start new TUR checker */
|
||||||
ct->state = PATH_UNCHECKED;
|
ct->state = PATH_UNCHECKED;
|
@ -7,28 +7,22 @@ tur_devt() locks ct->lock. However, it is ocassionally called while
|
|||||||
ct->lock is already locked. In reality, there is no reason why we need
|
ct->lock is already locked. In reality, there is no reason why we need
|
||||||
to lock all the accesses to ct->devt. The tur checker only needs to
|
to lock all the accesses to ct->devt. The tur checker only needs to
|
||||||
write to this variable one time, when it first gets the file descripter
|
write to this variable one time, when it first gets the file descripter
|
||||||
that it is checking. It also never uses ct->devt directly. Instead, it
|
that it is checking. This patch sets ct->devt in libcheck_init() when it
|
||||||
always graps the major and minor, and turns them into a string. This
|
is first initializing the checker context. After that, ct->devt is only
|
||||||
patch changes ct->devt into that string, and sets it in libcheck_init()
|
ever read.
|
||||||
when it is first initializing the checker context. After that, ct->devt
|
|
||||||
is only ever read.
|
|
||||||
|
|
||||||
Cc: Bart Van Assche <bart.vanassche@wdc.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
---
|
---
|
||||||
libmultipath/checkers/tur.c | 55 +++++++++++++--------------------------------
|
libmultipath/checkers/tur.c | 60 +++++++++++++++------------------------------
|
||||||
1 file changed, 16 insertions(+), 39 deletions(-)
|
1 file changed, 20 insertions(+), 40 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
||||||
index 275541f..d173648 100644
|
index 3c5e236..5844639 100644
|
||||||
--- a/libmultipath/checkers/tur.c
|
--- a/libmultipath/checkers/tur.c
|
||||||
+++ b/libmultipath/checkers/tur.c
|
+++ b/libmultipath/checkers/tur.c
|
||||||
@@ -37,36 +37,24 @@
|
@@ -39,34 +39,22 @@
|
||||||
#define MSG_TUR_FAILED "tur checker failed to initialize"
|
|
||||||
|
|
||||||
struct tur_checker_context {
|
struct tur_checker_context {
|
||||||
- dev_t devt;
|
dev_t devt;
|
||||||
+ char devt[32];
|
|
||||||
int state;
|
int state;
|
||||||
- int running;
|
- int running;
|
||||||
+ int running; /* uatomic access only */
|
+ int running; /* uatomic access only */
|
||||||
@ -64,17 +58,16 @@ index 275541f..d173648 100644
|
|||||||
|
|
||||||
ct = malloc(sizeof(struct tur_checker_context));
|
ct = malloc(sizeof(struct tur_checker_context));
|
||||||
if (!ct)
|
if (!ct)
|
||||||
@@ -81,6 +69,9 @@ int libcheck_init (struct checker * c)
|
@@ -81,6 +69,8 @@ int libcheck_init (struct checker * c)
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
pthread_mutex_init(&ct->lock, &attr);
|
pthread_mutex_init(&ct->lock, &attr);
|
||||||
pthread_mutexattr_destroy(&attr);
|
pthread_mutexattr_destroy(&attr);
|
||||||
+ if (fstat(c->fd, &sb) == 0)
|
+ if (fstat(c->fd, &sb) == 0)
|
||||||
+ snprintf(ct->devt, sizeof(ct->devt), "%d:%d", major(sb.st_rdev),
|
+ ct->devt = sb.st_rdev;
|
||||||
+ minor(sb.st_rdev));
|
|
||||||
c->context = ct;
|
c->context = ct;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -232,14 +223,12 @@ static void *tur_thread(void *ctx)
|
@@ -232,14 +222,13 @@ static void *tur_thread(void *ctx)
|
||||||
{
|
{
|
||||||
struct tur_checker_context *ct = ctx;
|
struct tur_checker_context *ct = ctx;
|
||||||
int state, running;
|
int state, running;
|
||||||
@ -86,7 +79,8 @@ index 275541f..d173648 100644
|
|||||||
|
|
||||||
- condlog(3, "%s: tur checker starting up",
|
- condlog(3, "%s: tur checker starting up",
|
||||||
- tur_devt(devt, sizeof(devt), ct));
|
- tur_devt(devt, sizeof(devt), ct));
|
||||||
+ condlog(3, "%s: tur checker starting up", ct->devt);
|
+ condlog(3, "%d:%d : tur checker starting up", major(ct->devt),
|
||||||
|
+ minor(ct->devt));
|
||||||
|
|
||||||
/* TUR checker start up */
|
/* TUR checker start up */
|
||||||
pthread_mutex_lock(&ct->lock);
|
pthread_mutex_lock(&ct->lock);
|
||||||
@ -96,8 +90,8 @@ index 275541f..d173648 100644
|
|||||||
|
|
||||||
- condlog(3, "%s: tur checker finished, state %s",
|
- condlog(3, "%s: tur checker finished, state %s",
|
||||||
- tur_devt(devt, sizeof(devt), ct), checker_state_name(state));
|
- tur_devt(devt, sizeof(devt), ct), checker_state_name(state));
|
||||||
+ condlog(3, "%s: tur checker finished, state %s", ct->devt,
|
+ condlog(3, "%d:%d : tur checker finished, state %s", major(ct->devt),
|
||||||
+ checker_state_name(state));
|
+ minor(ct->devt), checker_state_name(state));
|
||||||
|
|
||||||
running = uatomic_xchg(&ct->running, 0);
|
running = uatomic_xchg(&ct->running, 0);
|
||||||
if (!running)
|
if (!running)
|
||||||
@ -132,48 +126,55 @@ index 275541f..d173648 100644
|
|||||||
MSG(c, MSG_TUR_FAILED);
|
MSG(c, MSG_TUR_FAILED);
|
||||||
return PATH_WILD;
|
return PATH_WILD;
|
||||||
}
|
}
|
||||||
@@ -338,14 +318,12 @@ int libcheck_check(struct checker * c)
|
@@ -338,14 +318,14 @@ int libcheck_check(struct checker * c)
|
||||||
int running = uatomic_xchg(&ct->running, 0);
|
int running = uatomic_xchg(&ct->running, 0);
|
||||||
if (running)
|
if (running)
|
||||||
pthread_cancel(ct->thread);
|
pthread_cancel(ct->thread);
|
||||||
- condlog(3, "%s: tur checker timeout",
|
- condlog(3, "%s: tur checker timeout",
|
||||||
- tur_devt(devt, sizeof(devt), ct));
|
- tur_devt(devt, sizeof(devt), ct));
|
||||||
+ condlog(3, "%s: tur checker timeout", ct->devt);
|
+ condlog(3, "%d:%d : tur checker timeout",
|
||||||
|
+ major(ct->devt), minor(ct->devt));
|
||||||
ct->thread = 0;
|
ct->thread = 0;
|
||||||
MSG(c, MSG_TUR_TIMEOUT);
|
MSG(c, MSG_TUR_TIMEOUT);
|
||||||
tur_status = PATH_TIMEOUT;
|
tur_status = PATH_TIMEOUT;
|
||||||
} else if (uatomic_read(&ct->running) != 0) {
|
} else if (uatomic_read(&ct->running) != 0) {
|
||||||
- condlog(3, "%s: tur checker not finished",
|
- condlog(3, "%s: tur checker not finished",
|
||||||
- tur_devt(devt, sizeof(devt), ct));
|
- tur_devt(devt, sizeof(devt), ct));
|
||||||
+ condlog(3, "%s: tur checker not finished", ct->devt);
|
+ condlog(3, "%d:%d : tur checker not finished",
|
||||||
|
+ major(ct->devt), minor(ct->devt));
|
||||||
tur_status = PATH_PENDING;
|
tur_status = PATH_PENDING;
|
||||||
} else {
|
} else {
|
||||||
/* TUR checker done */
|
/* TUR checker done */
|
||||||
@@ -361,7 +339,7 @@ int libcheck_check(struct checker * c)
|
@@ -359,8 +339,8 @@ int libcheck_check(struct checker * c)
|
||||||
if (ct->state == PATH_PENDING) {
|
/* The thread has been cancelled but hasn't
|
||||||
pthread_mutex_unlock(&ct->lock);
|
* quilt. Fail back to synchronous mode */
|
||||||
condlog(3, "%s: tur thread not responding",
|
pthread_mutex_unlock(&ct->lock);
|
||||||
- tur_devt(devt, sizeof(devt), ct));
|
- condlog(3, "%s: tur checker failing back to sync",
|
||||||
+ ct->devt);
|
- tur_devt(devt, sizeof(devt), ct));
|
||||||
return PATH_TIMEOUT;
|
+ condlog(3, "%d:%d : tur checker failing back to sync",
|
||||||
}
|
+ major(ct->devt), minor(ct->devt));
|
||||||
|
return tur_check(c->fd, c->timeout, copy_msg_to_checker, c);
|
||||||
}
|
}
|
||||||
@@ -381,7 +359,7 @@ int libcheck_check(struct checker * c)
|
/* Start new TUR checker */
|
||||||
|
@@ -378,8 +358,8 @@ int libcheck_check(struct checker * c)
|
||||||
|
uatomic_set(&ct->running, 0);
|
||||||
ct->thread = 0;
|
ct->thread = 0;
|
||||||
pthread_mutex_unlock(&ct->lock);
|
pthread_mutex_unlock(&ct->lock);
|
||||||
condlog(3, "%s: failed to start tur thread, using"
|
- condlog(3, "%s: failed to start tur thread, using"
|
||||||
- " sync mode", tur_devt(devt, sizeof(devt), ct));
|
- " sync mode", tur_devt(devt, sizeof(devt), ct));
|
||||||
+ " sync mode", ct->devt);
|
+ condlog(3, "%d:%d : failed to start tur thread, using"
|
||||||
|
+ " sync mode", major(ct->devt), minor(ct->devt));
|
||||||
return tur_check(c->fd, c->timeout,
|
return tur_check(c->fd, c->timeout,
|
||||||
copy_msg_to_checker, c);
|
copy_msg_to_checker, c);
|
||||||
}
|
}
|
||||||
@@ -392,8 +370,7 @@ int libcheck_check(struct checker * c)
|
@@ -390,8 +370,8 @@ int libcheck_check(struct checker * c)
|
||||||
pthread_mutex_unlock(&ct->lock);
|
pthread_mutex_unlock(&ct->lock);
|
||||||
if (uatomic_read(&ct->running) != 0 &&
|
if (uatomic_read(&ct->running) != 0 &&
|
||||||
(tur_status == PATH_PENDING || tur_status == PATH_UNCHECKED)) {
|
(tur_status == PATH_PENDING || tur_status == PATH_UNCHECKED)) {
|
||||||
- condlog(3, "%s: tur checker still running",
|
- condlog(3, "%s: tur checker still running",
|
||||||
- tur_devt(devt, sizeof(devt), ct));
|
- tur_devt(devt, sizeof(devt), ct));
|
||||||
+ condlog(3, "%s: tur checker still running", ct->devt);
|
+ condlog(3, "%d:%d : tur checker still running",
|
||||||
|
+ major(ct->devt), minor(ct->devt));
|
||||||
tur_status = PATH_PENDING;
|
tur_status = PATH_PENDING;
|
||||||
} else {
|
} else {
|
||||||
int running = uatomic_xchg(&ct->running, 0);
|
int running = uatomic_xchg(&ct->running, 0);
|
@ -14,14 +14,14 @@ write to, and copy it later, if necessary.
|
|||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
---
|
---
|
||||||
libmultipath/checkers/tur.c | 46 +++++++++++----------------------------------
|
libmultipath/checkers/tur.c | 48 ++++++++++++---------------------------------
|
||||||
1 file changed, 11 insertions(+), 35 deletions(-)
|
1 file changed, 12 insertions(+), 36 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
||||||
index d173648..abda162 100644
|
index 5844639..0c7b5ca 100644
|
||||||
--- a/libmultipath/checkers/tur.c
|
--- a/libmultipath/checkers/tur.c
|
||||||
+++ b/libmultipath/checkers/tur.c
|
+++ b/libmultipath/checkers/tur.c
|
||||||
@@ -103,17 +103,8 @@ void libcheck_free (struct checker * c)
|
@@ -102,17 +102,8 @@ void libcheck_free (struct checker * c)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ index d173648..abda162 100644
|
|||||||
{
|
{
|
||||||
struct sg_io_hdr io_hdr;
|
struct sg_io_hdr io_hdr;
|
||||||
unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };
|
unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };
|
||||||
@@ -132,7 +123,7 @@ retry:
|
@@ -131,7 +122,7 @@ retry:
|
||||||
io_hdr.timeout = timeout * 1000;
|
io_hdr.timeout = timeout * 1000;
|
||||||
io_hdr.pack_id = 0;
|
io_hdr.pack_id = 0;
|
||||||
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
||||||
@ -49,7 +49,7 @@ index d173648..abda162 100644
|
|||||||
return PATH_DOWN;
|
return PATH_DOWN;
|
||||||
}
|
}
|
||||||
if ((io_hdr.status & 0x7e) == 0x18) {
|
if ((io_hdr.status & 0x7e) == 0x18) {
|
||||||
@@ -140,7 +131,7 @@ retry:
|
@@ -139,7 +130,7 @@ retry:
|
||||||
* SCSI-3 arrays might return
|
* SCSI-3 arrays might return
|
||||||
* reservation conflict on TUR
|
* reservation conflict on TUR
|
||||||
*/
|
*/
|
||||||
@ -58,7 +58,7 @@ index d173648..abda162 100644
|
|||||||
return PATH_UP;
|
return PATH_UP;
|
||||||
}
|
}
|
||||||
if (io_hdr.info & SG_INFO_OK_MASK) {
|
if (io_hdr.info & SG_INFO_OK_MASK) {
|
||||||
@@ -185,14 +176,14 @@ retry:
|
@@ -184,14 +175,14 @@ retry:
|
||||||
* LOGICAL UNIT NOT ACCESSIBLE,
|
* LOGICAL UNIT NOT ACCESSIBLE,
|
||||||
* TARGET PORT IN STANDBY STATE
|
* TARGET PORT IN STANDBY STATE
|
||||||
*/
|
*/
|
||||||
@ -76,7 +76,7 @@ index d173648..abda162 100644
|
|||||||
return PATH_UP;
|
return PATH_UP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,19 +201,11 @@ static void cleanup_func(void *data)
|
@@ -209,19 +200,11 @@ static void cleanup_func(void *data)
|
||||||
rcu_unregister_thread();
|
rcu_unregister_thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,10 +135,19 @@ index d173648..abda162 100644
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Async mode
|
* Async mode
|
||||||
|
@@ -341,7 +318,7 @@ int libcheck_check(struct checker * c)
|
||||||
|
pthread_mutex_unlock(&ct->lock);
|
||||||
|
condlog(3, "%d:%d : tur checker failing back to sync",
|
||||||
|
major(ct->devt), minor(ct->devt));
|
||||||
|
- return tur_check(c->fd, c->timeout, copy_msg_to_checker, c);
|
||||||
|
+ return tur_check(c->fd, c->timeout, c->message);
|
||||||
|
}
|
||||||
|
/* Start new TUR checker */
|
||||||
|
ct->state = PATH_UNCHECKED;
|
||||||
@@ -360,8 +337,7 @@ int libcheck_check(struct checker * c)
|
@@ -360,8 +337,7 @@ int libcheck_check(struct checker * c)
|
||||||
pthread_mutex_unlock(&ct->lock);
|
pthread_mutex_unlock(&ct->lock);
|
||||||
condlog(3, "%s: failed to start tur thread, using"
|
condlog(3, "%d:%d : failed to start tur thread, using"
|
||||||
" sync mode", ct->devt);
|
" sync mode", major(ct->devt), minor(ct->devt));
|
||||||
- return tur_check(c->fd, c->timeout,
|
- return tur_check(c->fd, c->timeout,
|
||||||
- copy_msg_to_checker, c);
|
- copy_msg_to_checker, c);
|
||||||
+ return tur_check(c->fd, c->timeout, c->message);
|
+ return tur_check(c->fd, c->timeout, c->message);
|
@ -21,11 +21,11 @@ return PATH_PENDING.
|
|||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
---
|
---
|
||||||
libmultipath/checkers/tur.c | 49 ++++++++++++++++++---------------------------
|
libmultipath/checkers/tur.c | 44 ++++++++++++++++----------------------------
|
||||||
1 file changed, 20 insertions(+), 29 deletions(-)
|
1 file changed, 16 insertions(+), 28 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
||||||
index abda162..9f6ef51 100644
|
index 0c7b5ca..983ba4c 100644
|
||||||
--- a/libmultipath/checkers/tur.c
|
--- a/libmultipath/checkers/tur.c
|
||||||
+++ b/libmultipath/checkers/tur.c
|
+++ b/libmultipath/checkers/tur.c
|
||||||
@@ -53,7 +53,6 @@ struct tur_checker_context {
|
@@ -53,7 +53,6 @@ struct tur_checker_context {
|
||||||
@ -46,11 +46,11 @@ index abda162..9f6ef51 100644
|
|||||||
- pthread_mutexattr_destroy(&attr);
|
- pthread_mutexattr_destroy(&attr);
|
||||||
+ pthread_mutex_init(&ct->lock, NULL);
|
+ pthread_mutex_init(&ct->lock, NULL);
|
||||||
if (fstat(c->fd, &sb) == 0)
|
if (fstat(c->fd, &sb) == 0)
|
||||||
snprintf(ct->devt, sizeof(ct->devt), "%d:%d", major(sb.st_rdev),
|
ct->devt = sb.st_rdev;
|
||||||
minor(sb.st_rdev));
|
c->context = ct;
|
||||||
@@ -213,12 +209,6 @@ static void *tur_thread(void *ctx)
|
@@ -213,12 +209,6 @@ static void *tur_thread(void *ctx)
|
||||||
|
condlog(3, "%d:%d : tur checker starting up", major(ct->devt),
|
||||||
condlog(3, "%s: tur checker starting up", ct->devt);
|
minor(ct->devt));
|
||||||
|
|
||||||
- /* TUR checker start up */
|
- /* TUR checker start up */
|
||||||
- pthread_mutex_lock(&ct->lock);
|
- pthread_mutex_lock(&ct->lock);
|
||||||
@ -75,7 +75,7 @@ index abda162..9f6ef51 100644
|
|||||||
if (ct->thread) {
|
if (ct->thread) {
|
||||||
if (tur_check_async_timeout(c)) {
|
if (tur_check_async_timeout(c)) {
|
||||||
int running = uatomic_xchg(&ct->running, 0);
|
int running = uatomic_xchg(&ct->running, 0);
|
||||||
@@ -305,23 +288,29 @@ int libcheck_check(struct checker * c)
|
@@ -307,21 +290,24 @@ int libcheck_check(struct checker * c)
|
||||||
} else {
|
} else {
|
||||||
/* TUR checker done */
|
/* TUR checker done */
|
||||||
ct->thread = 0;
|
ct->thread = 0;
|
||||||
@ -87,18 +87,12 @@ index abda162..9f6ef51 100644
|
|||||||
- pthread_mutex_unlock(&ct->lock);
|
- pthread_mutex_unlock(&ct->lock);
|
||||||
} else {
|
} else {
|
||||||
if (uatomic_read(&ct->holders) > 1) {
|
if (uatomic_read(&ct->holders) > 1) {
|
||||||
/* pthread cancel failed. If it didn't get the path
|
/* The thread has been cancelled but hasn't
|
||||||
state already, timeout */
|
* quilt. Fail back to synchronous mode */
|
||||||
- if (ct->state == PATH_PENDING) {
|
- pthread_mutex_unlock(&ct->lock);
|
||||||
- pthread_mutex_unlock(&ct->lock);
|
condlog(3, "%d:%d : tur checker failing back to sync",
|
||||||
+ pthread_mutex_lock(&ct->lock);
|
major(ct->devt), minor(ct->devt));
|
||||||
+ tur_status = ct->state;
|
return tur_check(c->fd, c->timeout, c->message);
|
||||||
+ pthread_mutex_unlock(&ct->lock);
|
|
||||||
+ if (tur_status == PATH_PENDING) {
|
|
||||||
condlog(3, "%s: tur thread not responding",
|
|
||||||
ct->devt);
|
|
||||||
return PATH_TIMEOUT;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Start new TUR checker */
|
/* Start new TUR checker */
|
||||||
- ct->state = PATH_UNCHECKED;
|
- ct->state = PATH_UNCHECKED;
|
||||||
@ -109,13 +103,13 @@ index abda162..9f6ef51 100644
|
|||||||
ct->fd = c->fd;
|
ct->fd = c->fd;
|
||||||
ct->timeout = c->timeout;
|
ct->timeout = c->timeout;
|
||||||
uatomic_add(&ct->holders, 1);
|
uatomic_add(&ct->holders, 1);
|
||||||
@@ -334,20 +323,22 @@ int libcheck_check(struct checker * c)
|
@@ -334,21 +320,23 @@ int libcheck_check(struct checker * c)
|
||||||
uatomic_sub(&ct->holders, 1);
|
uatomic_sub(&ct->holders, 1);
|
||||||
uatomic_set(&ct->running, 0);
|
uatomic_set(&ct->running, 0);
|
||||||
ct->thread = 0;
|
ct->thread = 0;
|
||||||
- pthread_mutex_unlock(&ct->lock);
|
- pthread_mutex_unlock(&ct->lock);
|
||||||
condlog(3, "%s: failed to start tur thread, using"
|
condlog(3, "%d:%d : failed to start tur thread, using"
|
||||||
" sync mode", ct->devt);
|
" sync mode", major(ct->devt), minor(ct->devt));
|
||||||
return tur_check(c->fd, c->timeout, c->message);
|
return tur_check(c->fd, c->timeout, c->message);
|
||||||
}
|
}
|
||||||
tur_timeout(&tsp);
|
tur_timeout(&tsp);
|
||||||
@ -134,7 +128,8 @@ index abda162..9f6ef51 100644
|
|||||||
- if (uatomic_read(&ct->running) != 0 &&
|
- if (uatomic_read(&ct->running) != 0 &&
|
||||||
- (tur_status == PATH_PENDING || tur_status == PATH_UNCHECKED)) {
|
- (tur_status == PATH_PENDING || tur_status == PATH_UNCHECKED)) {
|
||||||
+ if (tur_status == PATH_PENDING) {
|
+ if (tur_status == PATH_PENDING) {
|
||||||
condlog(3, "%s: tur checker still running", ct->devt);
|
condlog(3, "%d:%d : tur checker still running",
|
||||||
|
major(ct->devt), minor(ct->devt));
|
||||||
- tur_status = PATH_PENDING;
|
- tur_status = PATH_PENDING;
|
||||||
} else {
|
} else {
|
||||||
int running = uatomic_xchg(&ct->running, 0);
|
int running = uatomic_xchg(&ct->running, 0);
|
@ -12,22 +12,24 @@ check if the thread completed, and if so, it returns the proper value.
|
|||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
---
|
---
|
||||||
libmultipath/checkers/tur.c | 15 +++++++++++----
|
libmultipath/checkers/tur.c | 17 ++++++++++++-----
|
||||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
||||||
index 9f6ef51..4e2c7a8 100644
|
index 983ba4c..86c0cdc 100644
|
||||||
--- a/libmultipath/checkers/tur.c
|
--- a/libmultipath/checkers/tur.c
|
||||||
+++ b/libmultipath/checkers/tur.c
|
+++ b/libmultipath/checkers/tur.c
|
||||||
@@ -276,12 +276,19 @@ int libcheck_check(struct checker * c)
|
@@ -276,13 +276,20 @@ int libcheck_check(struct checker * c)
|
||||||
if (ct->thread) {
|
if (ct->thread) {
|
||||||
if (tur_check_async_timeout(c)) {
|
if (tur_check_async_timeout(c)) {
|
||||||
int running = uatomic_xchg(&ct->running, 0);
|
int running = uatomic_xchg(&ct->running, 0);
|
||||||
- if (running)
|
- if (running)
|
||||||
+ if (running) {
|
+ if (running) {
|
||||||
pthread_cancel(ct->thread);
|
pthread_cancel(ct->thread);
|
||||||
- condlog(3, "%s: tur checker timeout", ct->devt);
|
- condlog(3, "%d:%d : tur checker timeout",
|
||||||
+ condlog(3, "%s: tur checker timeout", ct->devt);
|
- major(ct->devt), minor(ct->devt));
|
||||||
|
+ condlog(3, "%d:%d : tur checker timeout",
|
||||||
|
+ major(ct->devt), minor(ct->devt));
|
||||||
+ MSG(c, MSG_TUR_TIMEOUT);
|
+ MSG(c, MSG_TUR_TIMEOUT);
|
||||||
+ tur_status = PATH_TIMEOUT;
|
+ tur_status = PATH_TIMEOUT;
|
||||||
+ } else {
|
+ } else {
|
||||||
@ -41,8 +43,8 @@ index 9f6ef51..4e2c7a8 100644
|
|||||||
- MSG(c, MSG_TUR_TIMEOUT);
|
- MSG(c, MSG_TUR_TIMEOUT);
|
||||||
- tur_status = PATH_TIMEOUT;
|
- tur_status = PATH_TIMEOUT;
|
||||||
} else if (uatomic_read(&ct->running) != 0) {
|
} else if (uatomic_read(&ct->running) != 0) {
|
||||||
condlog(3, "%s: tur checker not finished", ct->devt);
|
condlog(3, "%d:%d : tur checker not finished",
|
||||||
tur_status = PATH_PENDING;
|
major(ct->devt), minor(ct->devt));
|
||||||
--
|
--
|
||||||
2.7.4
|
2.7.4
|
||||||
|
|
@ -15,7 +15,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||||
index 0b1855d..3e0db7f 100644
|
index f973d4b..301093f 100644
|
||||||
--- a/libmultipath/discovery.c
|
--- a/libmultipath/discovery.c
|
||||||
+++ b/libmultipath/discovery.c
|
+++ b/libmultipath/discovery.c
|
||||||
@@ -1116,17 +1116,21 @@ get_vpd_sgio (int fd, int pg, char * str, int maxlen)
|
@@ -1116,17 +1116,21 @@ get_vpd_sgio (int fd, int pg, char * str, int maxlen)
|
@ -14,7 +14,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
index cc493c1..125a805 100644
|
index ba796ab..cd96304 100644
|
||||||
--- a/multipathd/main.c
|
--- a/multipathd/main.c
|
||||||
+++ b/multipathd/main.c
|
+++ b/multipathd/main.c
|
||||||
@@ -429,7 +429,7 @@ int update_multipath (struct vectors *vecs, char *mapname, int reset)
|
@@ -429,7 +429,7 @@ int update_multipath (struct vectors *vecs, char *mapname, int reset)
|
||||||
@ -26,7 +26,7 @@ index cc493c1..125a805 100644
|
|||||||
int oldstate = pp->state;
|
int oldstate = pp->state;
|
||||||
int checkint;
|
int checkint;
|
||||||
|
|
||||||
@@ -1096,7 +1096,7 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
@@ -1097,7 +1097,7 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
||||||
/*
|
/*
|
||||||
* flush_map will fail if the device is open
|
* flush_map will fail if the device is open
|
||||||
*/
|
*/
|
@ -14,10 +14,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
index 125a805..3c2fe7b 100644
|
index cd96304..463b1b8 100644
|
||||||
--- a/multipathd/main.c
|
--- a/multipathd/main.c
|
||||||
+++ b/multipathd/main.c
|
+++ b/multipathd/main.c
|
||||||
@@ -1978,14 +1978,14 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
|
@@ -1979,14 +1979,14 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -12,10 +12,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
index 3c2fe7b..61ca455 100644
|
index 463b1b8..04dce04 100644
|
||||||
--- a/multipathd/main.c
|
--- a/multipathd/main.c
|
||||||
+++ b/multipathd/main.c
|
+++ b/multipathd/main.c
|
||||||
@@ -2277,7 +2277,7 @@ configure (struct vectors * vecs)
|
@@ -2278,7 +2278,7 @@ configure (struct vectors * vecs)
|
||||||
ret = path_discovery(vecs->pathvec, DI_ALL);
|
ret = path_discovery(vecs->pathvec, DI_ALL);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
condlog(0, "configure failed at path discovery");
|
condlog(0, "configure failed at path discovery");
|
||||||
@ -24,7 +24,7 @@ index 3c2fe7b..61ca455 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
vector_foreach_slot (vecs->pathvec, pp, i){
|
vector_foreach_slot (vecs->pathvec, pp, i){
|
||||||
@@ -2294,7 +2294,7 @@ configure (struct vectors * vecs)
|
@@ -2295,7 +2295,7 @@ configure (struct vectors * vecs)
|
||||||
}
|
}
|
||||||
if (map_discovery(vecs)) {
|
if (map_discovery(vecs)) {
|
||||||
condlog(0, "configure failed at map discovery");
|
condlog(0, "configure failed at map discovery");
|
||||||
@ -33,7 +33,7 @@ index 3c2fe7b..61ca455 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2308,7 +2308,7 @@ configure (struct vectors * vecs)
|
@@ -2309,7 +2309,7 @@ configure (struct vectors * vecs)
|
||||||
force_reload = FORCE_RELOAD_YES;
|
force_reload = FORCE_RELOAD_YES;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
condlog(0, "configure failed while coalescing paths");
|
condlog(0, "configure failed while coalescing paths");
|
||||||
@ -42,7 +42,7 @@ index 3c2fe7b..61ca455 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2317,7 +2317,7 @@ configure (struct vectors * vecs)
|
@@ -2318,7 +2318,7 @@ configure (struct vectors * vecs)
|
||||||
*/
|
*/
|
||||||
if (coalesce_maps(vecs, mpvec)) {
|
if (coalesce_maps(vecs, mpvec)) {
|
||||||
condlog(0, "configure failed while coalescing maps");
|
condlog(0, "configure failed while coalescing maps");
|
||||||
@ -51,7 +51,7 @@ index 3c2fe7b..61ca455 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
dm_lib_release();
|
dm_lib_release();
|
||||||
@@ -2353,6 +2353,10 @@ configure (struct vectors * vecs)
|
@@ -2354,6 +2354,10 @@ configure (struct vectors * vecs)
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
@ -15,10 +15,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||||
index 3e0db7f..33815dc 100644
|
index 301093f..b267f07 100644
|
||||||
--- a/libmultipath/discovery.c
|
--- a/libmultipath/discovery.c
|
||||||
+++ b/libmultipath/discovery.c
|
+++ b/libmultipath/discovery.c
|
||||||
@@ -1991,9 +1991,9 @@ blank:
|
@@ -2004,9 +2004,9 @@ blank:
|
||||||
/*
|
/*
|
||||||
* Recoverable error, for example faulty or offline path
|
* Recoverable error, for example faulty or offline path
|
||||||
*/
|
*/
|
@ -33,10 +33,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 14 insertions(+), 10 deletions(-)
|
1 file changed, 14 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
index 61ca455..d6d122a 100644
|
index 04dce04..af33239 100644
|
||||||
--- a/multipathd/main.c
|
--- a/multipathd/main.c
|
||||||
+++ b/multipathd/main.c
|
+++ b/multipathd/main.c
|
||||||
@@ -1207,6 +1207,15 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
@@ -1208,6 +1208,15 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
||||||
struct multipath *mpp = pp->mpp;
|
struct multipath *mpp = pp->mpp;
|
||||||
char wwid[WWID_SIZE];
|
char wwid[WWID_SIZE];
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ index 61ca455..d6d122a 100644
|
|||||||
strcpy(wwid, pp->wwid);
|
strcpy(wwid, pp->wwid);
|
||||||
get_uid(pp, pp->state, uev->udev);
|
get_uid(pp, pp->state, uev->udev);
|
||||||
|
|
||||||
@@ -1215,9 +1224,8 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
@@ -1216,9 +1225,8 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
||||||
uev->kernel, wwid, pp->wwid,
|
uev->kernel, wwid, pp->wwid,
|
||||||
(disable_changed_wwids ? "disallowing" :
|
(disable_changed_wwids ? "disallowing" :
|
||||||
"continuing"));
|
"continuing"));
|
||||||
@ -64,7 +64,7 @@ index 61ca455..d6d122a 100644
|
|||||||
if (!pp->wwid_changed) {
|
if (!pp->wwid_changed) {
|
||||||
pp->wwid_changed = 1;
|
pp->wwid_changed = 1;
|
||||||
pp->tick = 1;
|
pp->tick = 1;
|
||||||
@@ -1225,11 +1233,9 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
@@ -1226,11 +1234,9 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
||||||
dm_fail_path(pp->mpp->alias, pp->dev_t);
|
dm_fail_path(pp->mpp->alias, pp->dev_t);
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
@ -78,7 +78,7 @@ index 61ca455..d6d122a 100644
|
|||||||
udev_device_unref(pp->udev);
|
udev_device_unref(pp->udev);
|
||||||
pp->udev = udev_device_ref(uev->udev);
|
pp->udev = udev_device_ref(uev->udev);
|
||||||
conf = get_multipath_config();
|
conf = get_multipath_config();
|
||||||
@@ -1240,9 +1246,7 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
@@ -1241,9 +1247,7 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
||||||
pthread_cleanup_pop(1);
|
pthread_cleanup_pop(1);
|
||||||
}
|
}
|
||||||
|
|
@ -35,10 +35,10 @@ index 8136d15..0433b49 100644
|
|||||||
condlog(level, "libdevmapper: %s(%i): ", file, line);
|
condlog(level, "libdevmapper: %s(%i): ", file, line);
|
||||||
log_safe(level + 3, f, ap);
|
log_safe(level + 3, f, ap);
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
index d6d122a..3c1d89f 100644
|
index af33239..5f0193b 100644
|
||||||
--- a/multipathd/main.c
|
--- a/multipathd/main.c
|
||||||
+++ b/multipathd/main.c
|
+++ b/multipathd/main.c
|
||||||
@@ -2983,6 +2983,7 @@ main (int argc, char *argv[])
|
@@ -2984,6 +2984,7 @@ main (int argc, char *argv[])
|
||||||
logsink = -1;
|
logsink = -1;
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
@ -46,7 +46,7 @@ index d6d122a..3c1d89f 100644
|
|||||||
conf = load_config(DEFAULT_CONFIGFILE);
|
conf = load_config(DEFAULT_CONFIGFILE);
|
||||||
if (!conf)
|
if (!conf)
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -3012,6 +3013,7 @@ main (int argc, char *argv[])
|
@@ -3013,6 +3014,7 @@ main (int argc, char *argv[])
|
||||||
char * s = cmd;
|
char * s = cmd;
|
||||||
char * c = s;
|
char * c = s;
|
||||||
|
|
31
0022-multipathd-check-for-NULL-udevice-in-cli_add_path.patch
Normal file
31
0022-multipathd-check-for-NULL-udevice-in-cli_add_path.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Date: Fri, 5 Oct 2018 17:20:38 -0500
|
||||||
|
Subject: [PATCH] multipathd: check for NULL udevice in cli_add_path
|
||||||
|
|
||||||
|
If cli_add_path can't get a udevice for the path, it should fail,
|
||||||
|
instead of continuing with a NULL udevice.
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
multipathd/cli_handlers.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
|
||||||
|
index bb16472..7500080 100644
|
||||||
|
--- a/multipathd/cli_handlers.c
|
||||||
|
+++ b/multipathd/cli_handlers.c
|
||||||
|
@@ -720,6 +720,10 @@ cli_add_path (void * v, char ** reply, int * len, void * data)
|
||||||
|
udevice = udev_device_new_from_subsystem_sysname(udev,
|
||||||
|
"block",
|
||||||
|
param);
|
||||||
|
+ if (!udevice) {
|
||||||
|
+ condlog(0, "%s: can't find path", param);
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
conf = get_multipath_config();
|
||||||
|
pthread_cleanup_push(put_multipath_config, conf);
|
||||||
|
r = store_pathinfo(vecs->pathvec, conf,
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
188
0023-libmultipath-remove-max_fds-code-duplication.patch
Normal file
188
0023-libmultipath-remove-max_fds-code-duplication.patch
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Date: Mon, 8 Oct 2018 11:41:03 -0500
|
||||||
|
Subject: [PATCH] libmultipath: remove max_fds code duplication
|
||||||
|
|
||||||
|
Instead of multipath, multipathd, and mpathpersist all having code to
|
||||||
|
set the max number of open file descriptors, just use a util function to
|
||||||
|
do it.
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmpathpersist/mpath_persist.c | 11 +----------
|
||||||
|
libmultipath/util.c | 31 +++++++++++++++++++++++++++++++
|
||||||
|
libmultipath/util.h | 1 +
|
||||||
|
multipath/main.c | 12 +-----------
|
||||||
|
multipathd/main.c | 31 +++----------------------------
|
||||||
|
5 files changed, 37 insertions(+), 49 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
|
||||||
|
index 4229a94..29e7fb4 100644
|
||||||
|
--- a/libmpathpersist/mpath_persist.c
|
||||||
|
+++ b/libmpathpersist/mpath_persist.c
|
||||||
|
@@ -31,7 +31,6 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
-#include <sys/resource.h>
|
||||||
|
|
||||||
|
#define __STDC_FORMAT_MACROS 1
|
||||||
|
|
||||||
|
@@ -48,15 +47,7 @@ mpath_lib_init (void)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (conf->max_fds) {
|
||||||
|
- struct rlimit fd_limit;
|
||||||
|
-
|
||||||
|
- fd_limit.rlim_cur = conf->max_fds;
|
||||||
|
- fd_limit.rlim_max = conf->max_fds;
|
||||||
|
- if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0)
|
||||||
|
- condlog(0, "can't set open fds limit to %d : %s",
|
||||||
|
- conf->max_fds, strerror(errno));
|
||||||
|
- }
|
||||||
|
+ set_max_fds(conf->max_fds);
|
||||||
|
|
||||||
|
return conf;
|
||||||
|
}
|
||||||
|
diff --git a/libmultipath/util.c b/libmultipath/util.c
|
||||||
|
index 347af5b..d08112d 100644
|
||||||
|
--- a/libmultipath/util.c
|
||||||
|
+++ b/libmultipath/util.c
|
||||||
|
@@ -7,6 +7,8 @@
|
||||||
|
#include <sys/sysmacros.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
+#include <sys/time.h>
|
||||||
|
+#include <sys/resource.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
@@ -465,3 +467,32 @@ int safe_write(int fd, const void *buf, size_t count)
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void set_max_fds(int max_fds)
|
||||||
|
+{
|
||||||
|
+ struct rlimit fd_limit;
|
||||||
|
+
|
||||||
|
+ if (!max_fds)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (getrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
|
||||||
|
+ condlog(0, "can't get open fds limit: %s",
|
||||||
|
+ strerror(errno));
|
||||||
|
+ fd_limit.rlim_cur = 0;
|
||||||
|
+ fd_limit.rlim_max = 0;
|
||||||
|
+ }
|
||||||
|
+ if (fd_limit.rlim_cur < max_fds) {
|
||||||
|
+ fd_limit.rlim_cur = max_fds;
|
||||||
|
+ if (fd_limit.rlim_max < max_fds)
|
||||||
|
+ fd_limit.rlim_max = max_fds;
|
||||||
|
+ if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
|
||||||
|
+ condlog(0, "can't set open fds limit to "
|
||||||
|
+ "%lu/%lu : %s",
|
||||||
|
+ fd_limit.rlim_cur, fd_limit.rlim_max,
|
||||||
|
+ strerror(errno));
|
||||||
|
+ } else {
|
||||||
|
+ condlog(3, "set open fds limit to %lu/%lu",
|
||||||
|
+ fd_limit.rlim_cur, fd_limit.rlim_max);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
diff --git a/libmultipath/util.h b/libmultipath/util.h
|
||||||
|
index 56cec76..c246295 100644
|
||||||
|
--- a/libmultipath/util.h
|
||||||
|
+++ b/libmultipath/util.h
|
||||||
|
@@ -21,6 +21,7 @@ int get_linux_version_code(void);
|
||||||
|
int parse_prkey(char *ptr, uint64_t *prkey);
|
||||||
|
int parse_prkey_flags(char *ptr, uint64_t *prkey, uint8_t *flags);
|
||||||
|
int safe_write(int fd, const void *buf, size_t count);
|
||||||
|
+void set_max_fds(int max_fds);
|
||||||
|
|
||||||
|
#define KERNEL_VERSION(maj, min, ptc) ((((maj) * 256) + (min)) * 256 + (ptc))
|
||||||
|
|
||||||
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
|
index d5aad95..05b7bf0 100644
|
||||||
|
--- a/multipath/main.c
|
||||||
|
+++ b/multipath/main.c
|
||||||
|
@@ -56,8 +56,6 @@
|
||||||
|
#include "pgpolicies.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include <errno.h>
|
||||||
|
-#include <sys/time.h>
|
||||||
|
-#include <sys/resource.h>
|
||||||
|
#include "wwids.h"
|
||||||
|
#include "uxsock.h"
|
||||||
|
#include "mpath_cmd.h"
|
||||||
|
@@ -1002,15 +1000,7 @@ main (int argc, char *argv[])
|
||||||
|
logsink = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (conf->max_fds) {
|
||||||
|
- struct rlimit fd_limit;
|
||||||
|
-
|
||||||
|
- fd_limit.rlim_cur = conf->max_fds;
|
||||||
|
- fd_limit.rlim_max = conf->max_fds;
|
||||||
|
- if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0)
|
||||||
|
- condlog(0, "can't set open fds limit to %d : %s",
|
||||||
|
- conf->max_fds, strerror(errno));
|
||||||
|
- }
|
||||||
|
+ set_max_fds(conf->max_fds);
|
||||||
|
|
||||||
|
libmp_udev_set_sync_support(1);
|
||||||
|
|
||||||
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
|
index 5f0193b..d3f7719 100644
|
||||||
|
--- a/multipathd/main.c
|
||||||
|
+++ b/multipathd/main.c
|
||||||
|
@@ -12,8 +12,6 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
-#include <sys/time.h>
|
||||||
|
-#include <sys/resource.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <linux/oom.h>
|
||||||
|
#include <libudev.h>
|
||||||
|
@@ -2663,33 +2661,10 @@ child (void * param)
|
||||||
|
|
||||||
|
envp = getenv("LimitNOFILE");
|
||||||
|
|
||||||
|
- if (envp) {
|
||||||
|
+ if (envp)
|
||||||
|
condlog(2,"Using systemd provided open fds limit of %s", envp);
|
||||||
|
- } else if (conf->max_fds) {
|
||||||
|
- struct rlimit fd_limit;
|
||||||
|
-
|
||||||
|
- if (getrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
|
||||||
|
- condlog(0, "can't get open fds limit: %s",
|
||||||
|
- strerror(errno));
|
||||||
|
- fd_limit.rlim_cur = 0;
|
||||||
|
- fd_limit.rlim_max = 0;
|
||||||
|
- }
|
||||||
|
- if (fd_limit.rlim_cur < conf->max_fds) {
|
||||||
|
- fd_limit.rlim_cur = conf->max_fds;
|
||||||
|
- if (fd_limit.rlim_max < conf->max_fds)
|
||||||
|
- fd_limit.rlim_max = conf->max_fds;
|
||||||
|
- if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
|
||||||
|
- condlog(0, "can't set open fds limit to "
|
||||||
|
- "%lu/%lu : %s",
|
||||||
|
- fd_limit.rlim_cur, fd_limit.rlim_max,
|
||||||
|
- strerror(errno));
|
||||||
|
- } else {
|
||||||
|
- condlog(3, "set open fds limit to %lu/%lu",
|
||||||
|
- fd_limit.rlim_cur, fd_limit.rlim_max);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- }
|
||||||
|
+ else
|
||||||
|
+ set_max_fds(conf->max_fds);
|
||||||
|
|
||||||
|
vecs = gvecs = init_vecs();
|
||||||
|
if (!vecs)
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
@ -0,0 +1,98 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Date: Mon, 8 Oct 2018 14:49:30 -0500
|
||||||
|
Subject: [PATCH] multipathd: set return code for multipathd commands
|
||||||
|
|
||||||
|
Failed multipathd commands should set the return code to 1.
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
multipathd/main.c | 8 ++++----
|
||||||
|
multipathd/uxclnt.c | 13 ++++++++-----
|
||||||
|
2 files changed, 12 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
|
index d3f7719..2d45d98 100644
|
||||||
|
--- a/multipathd/main.c
|
||||||
|
+++ b/multipathd/main.c
|
||||||
|
@@ -2966,9 +2966,9 @@ main (int argc, char *argv[])
|
||||||
|
if (verbosity)
|
||||||
|
conf->verbosity = verbosity;
|
||||||
|
uxsock_timeout = conf->uxsock_timeout;
|
||||||
|
- uxclnt(optarg, uxsock_timeout + 100);
|
||||||
|
+ err = uxclnt(optarg, uxsock_timeout + 100);
|
||||||
|
free_config(conf);
|
||||||
|
- exit(0);
|
||||||
|
+ return err;
|
||||||
|
case 'B':
|
||||||
|
bindings_read_only = 1;
|
||||||
|
break;
|
||||||
|
@@ -3005,9 +3005,9 @@ main (int argc, char *argv[])
|
||||||
|
optind++;
|
||||||
|
}
|
||||||
|
c += snprintf(c, s + CMDSIZE - c, "\n");
|
||||||
|
- uxclnt(s, uxsock_timeout + 100);
|
||||||
|
+ err = uxclnt(s, uxsock_timeout + 100);
|
||||||
|
free_config(conf);
|
||||||
|
- exit(0);
|
||||||
|
+ return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (foreground) {
|
||||||
|
diff --git a/multipathd/uxclnt.c b/multipathd/uxclnt.c
|
||||||
|
index 08db0e8..a76f8e2 100644
|
||||||
|
--- a/multipathd/uxclnt.c
|
||||||
|
+++ b/multipathd/uxclnt.c
|
||||||
|
@@ -103,14 +103,14 @@ static void process(int fd, unsigned int timeout)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void process_req(int fd, char * inbuf, unsigned int timeout)
|
||||||
|
+static int process_req(int fd, char * inbuf, unsigned int timeout)
|
||||||
|
{
|
||||||
|
char *reply;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (send_packet(fd, inbuf) != 0) {
|
||||||
|
printf("cannot send packet\n");
|
||||||
|
- return;
|
||||||
|
+ return 1;
|
||||||
|
}
|
||||||
|
ret = recv_packet(fd, &reply, timeout);
|
||||||
|
if (ret < 0) {
|
||||||
|
@@ -118,9 +118,12 @@ static void process_req(int fd, char * inbuf, unsigned int timeout)
|
||||||
|
printf("timeout receiving packet\n");
|
||||||
|
else
|
||||||
|
printf("error %d receiving packet\n", ret);
|
||||||
|
+ return 1;
|
||||||
|
} else {
|
||||||
|
printf("%s", reply);
|
||||||
|
+ ret = (strcmp(reply, "fail\n") == 0);
|
||||||
|
FREE(reply);
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -129,16 +132,16 @@ static void process_req(int fd, char * inbuf, unsigned int timeout)
|
||||||
|
*/
|
||||||
|
int uxclnt(char * inbuf, unsigned int timeout)
|
||||||
|
{
|
||||||
|
- int fd;
|
||||||
|
+ int fd, ret = 0;
|
||||||
|
|
||||||
|
fd = mpath_connect();
|
||||||
|
if (fd == -1)
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
if (inbuf)
|
||||||
|
- process_req(fd, inbuf, timeout);
|
||||||
|
+ ret = process_req(fd, inbuf, timeout);
|
||||||
|
else
|
||||||
|
process(fd, timeout);
|
||||||
|
mpath_disconnect(fd);
|
||||||
|
- return 0;
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
39
0025-mpathpersist-fix-registration-rollback-issue.patch
Normal file
39
0025-mpathpersist-fix-registration-rollback-issue.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Date: Mon, 8 Oct 2018 16:45:11 -0500
|
||||||
|
Subject: [PATCH] mpathpersist: fix registration rollback issue
|
||||||
|
|
||||||
|
When mpathpersist tries to rollback the registration, it copies
|
||||||
|
the SARK to the RK, and clears the SARK. However, it repeated this step
|
||||||
|
for each thread. This means that the first rollback thread correctly
|
||||||
|
had the RK set to the SARK used during registration. However, if more
|
||||||
|
than one registration needed to be rolled back, later threads would have
|
||||||
|
both the RK and SARK cleared. This commit fixes that by only copying and
|
||||||
|
clearing the SARK once.
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmpathpersist/mpath_persist.c | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
|
||||||
|
index 29e7fb4..2ffe56e 100644
|
||||||
|
--- a/libmpathpersist/mpath_persist.c
|
||||||
|
+++ b/libmpathpersist/mpath_persist.c
|
||||||
|
@@ -559,11 +559,10 @@ int mpath_prout_reg(struct multipath *mpp,int rq_servact, int rq_scope,
|
||||||
|
}
|
||||||
|
if (rollback && ((rq_servact == MPATH_PROUT_REG_SA) && sa_key != 0 )){
|
||||||
|
condlog (3, "%s: ERROR: initiating pr out rollback", mpp->wwid);
|
||||||
|
+ memcpy(¶mp->key, ¶mp->sa_key, 8);
|
||||||
|
+ memset(¶mp->sa_key, 0, 8);
|
||||||
|
for( i=0 ; i < count ; i++){
|
||||||
|
if(thread[i].param.status == MPATH_PR_SUCCESS) {
|
||||||
|
- memcpy(&thread[i].param.paramp->key, &thread[i].param.paramp->sa_key, 8);
|
||||||
|
- memset(&thread[i].param.paramp->sa_key, 0, 8);
|
||||||
|
- thread[i].param.status = MPATH_PR_SUCCESS;
|
||||||
|
rc = pthread_create(&thread[i].id, &attr, mpath_prout_pthread_fn,
|
||||||
|
(void *)(&thread[i].param));
|
||||||
|
if (rc){
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
@ -65,10 +65,10 @@ index 0828a8f..b9bbb3c 100644
|
|||||||
$(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
|
$(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
|
||||||
|
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
index d5aad95..8086b76 100644
|
index 05b7bf0..ffa5b22 100644
|
||||||
--- a/multipath/main.c
|
--- a/multipath/main.c
|
||||||
+++ b/multipath/main.c
|
+++ b/multipath/main.c
|
||||||
@@ -403,7 +403,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo,
|
@@ -401,7 +401,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo,
|
||||||
struct timespec now, ftimes[2], tdiff;
|
struct timespec now, ftimes[2], tdiff;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
long fd;
|
long fd;
|
@ -86,10 +86,10 @@ index 0c6ee54..e32a0b0 100644
|
|||||||
enum {
|
enum {
|
||||||
WWID_IS_NOT_FAILED = 0,
|
WWID_IS_NOT_FAILED = 0,
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
index 8086b76..85b60e8 100644
|
index ffa5b22..ccb6091 100644
|
||||||
--- a/multipath/main.c
|
--- a/multipath/main.c
|
||||||
+++ b/multipath/main.c
|
+++ b/multipath/main.c
|
||||||
@@ -122,7 +122,7 @@ usage (char * progname)
|
@@ -120,7 +120,7 @@ usage (char * progname)
|
||||||
{
|
{
|
||||||
fprintf (stderr, VERSION_STRING);
|
fprintf (stderr, VERSION_STRING);
|
||||||
fprintf (stderr, "Usage:\n");
|
fprintf (stderr, "Usage:\n");
|
||||||
@ -98,7 +98,7 @@ index 8086b76..85b60e8 100644
|
|||||||
fprintf (stderr, " %s -l|-ll|-f [-v lvl] [-b fil] [-R num] [dev]\n", progname);
|
fprintf (stderr, " %s -l|-ll|-f [-v lvl] [-b fil] [-R num] [dev]\n", progname);
|
||||||
fprintf (stderr, " %s -F [-v lvl] [-R num]\n", progname);
|
fprintf (stderr, " %s -F [-v lvl] [-R num]\n", progname);
|
||||||
fprintf (stderr, " %s [-t|-T]\n", progname);
|
fprintf (stderr, " %s [-t|-T]\n", progname);
|
||||||
@@ -136,6 +136,8 @@ usage (char * progname)
|
@@ -134,6 +134,8 @@ usage (char * progname)
|
||||||
" -f flush a multipath device map\n"
|
" -f flush a multipath device map\n"
|
||||||
" -F flush all multipath device maps\n"
|
" -F flush all multipath device maps\n"
|
||||||
" -a add a device wwid to the wwids file\n"
|
" -a add a device wwid to the wwids file\n"
|
||||||
@ -107,7 +107,7 @@ index 8086b76..85b60e8 100644
|
|||||||
" -c check if a device should be a path in a multipath device\n"
|
" -c check if a device should be a path in a multipath device\n"
|
||||||
" -C check if a multipath device has usable paths\n"
|
" -C check if a multipath device has usable paths\n"
|
||||||
" -q allow queue_if_no_path when multipathd is not running\n"
|
" -q allow queue_if_no_path when multipathd is not running\n"
|
||||||
@@ -870,7 +872,7 @@ main (int argc, char *argv[])
|
@@ -868,7 +870,7 @@ main (int argc, char *argv[])
|
||||||
exit(1);
|
exit(1);
|
||||||
multipath_conf = conf;
|
multipath_conf = conf;
|
||||||
conf->retrigger_tries = 0;
|
conf->retrigger_tries = 0;
|
||||||
@ -116,7 +116,7 @@ index 8086b76..85b60e8 100644
|
|||||||
switch(arg) {
|
switch(arg) {
|
||||||
case 1: printf("optarg : %s\n",optarg);
|
case 1: printf("optarg : %s\n",optarg);
|
||||||
break;
|
break;
|
||||||
@@ -940,6 +942,10 @@ main (int argc, char *argv[])
|
@@ -938,6 +940,10 @@ main (int argc, char *argv[])
|
||||||
case 'T':
|
case 'T':
|
||||||
cmd = CMD_DUMP_CONFIG;
|
cmd = CMD_DUMP_CONFIG;
|
||||||
break;
|
break;
|
@ -1,43 +1,48 @@
|
|||||||
Name: device-mapper-multipath
|
Name: device-mapper-multipath
|
||||||
Version: 0.7.7
|
Version: 0.7.7
|
||||||
Release: 6.git1a8625a%{?dist}
|
Release: 7.gitb80318b%{?dist}
|
||||||
Summary: Tools to manage multipath devices using device-mapper
|
Summary: Tools to manage multipath devices using device-mapper
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://christophe.varoqui.free.fr/
|
URL: http://christophe.varoqui.free.fr/
|
||||||
|
|
||||||
# The source for this package was pulled from upstream's git repo. Use the
|
# The source for this package was pulled from upstream's git repo. Use the
|
||||||
# following command to generate the tarball
|
# following command to generate the tarball
|
||||||
# curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=ef6d98b;sf=tgz" -o multipath-tools-ef6d98b.tgz
|
# curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=b80318b;sf=tgz" -o multipath-tools-b80318b.tgz
|
||||||
Source0: multipath-tools-1a8625a.tgz
|
Source0: multipath-tools-b80318b.tgz
|
||||||
Source1: multipath.conf
|
Source1: multipath.conf
|
||||||
Patch0001: 0001-libmultipath-fix-tur-checker-timeout.patch
|
Patch0001: 0001-kpartx-Use-absolute-paths-to-create-mappings.patch
|
||||||
Patch0002: 0002-libmultipath-fix-tur-checker-double-locking.patch
|
Patch0002: 0002-libmultipath-fix-tur-checker-timeout.patch
|
||||||
Patch0003: 0003-libmultipath-fix-tur-memory-misuse.patch
|
Patch0003: 0003-libmultipath-fix-tur-checker-double-locking.patch
|
||||||
Patch0004: 0004-libmultipath-cleanup-tur-locking.patch
|
Patch0004: 0004-libmultipath-fix-tur-memory-misuse.patch
|
||||||
Patch0005: 0005-libmultipath-fix-tur-checker-timeout-issue.patch
|
Patch0005: 0005-libmultipath-cleanup-tur-locking.patch
|
||||||
Patch0006: 0006-libmultipath-fix-set_int-error-path.patch
|
Patch0006: 0006-libmultipath-fix-tur-checker-timeout-issue.patch
|
||||||
Patch0007: 0007-libmultipath-fix-length-issues-in-get_vpd_sgio.patch
|
Patch0007: 0007-libmultipath-fix-set_int-error-path.patch
|
||||||
Patch0008: 0008-libmultipath-_install_keyword-cleanup.patch
|
Patch0008: 0008-libmultipath-fix-length-issues-in-get_vpd_sgio.patch
|
||||||
Patch0009: 0009-libmultipath-remove-unused-code.patch
|
Patch0009: 0009-libmultipath-_install_keyword-cleanup.patch
|
||||||
Patch0010: 0010-libmultipath-fix-memory-issue-in-path_latency-prio.patch
|
Patch0010: 0010-libmultipath-remove-unused-code.patch
|
||||||
Patch0011: 0011-libmultipath-fix-null-dereference-int-alloc_path_gro.patch
|
Patch0011: 0011-libmultipath-fix-memory-issue-in-path_latency-prio.patch
|
||||||
Patch0012: 0012-libmutipath-don-t-use-malformed-uevents.patch
|
Patch0012: 0012-libmultipath-fix-null-dereference-int-alloc_path_gro.patch
|
||||||
Patch0013: 0013-multipath-fix-max-array-size-in-print_cmd_valid.patch
|
Patch0013: 0013-libmutipath-don-t-use-malformed-uevents.patch
|
||||||
Patch0014: 0014-multipathd-function-return-value-tweaks.patch
|
Patch0014: 0014-multipath-fix-max-array-size-in-print_cmd_valid.patch
|
||||||
Patch0015: 0015-multipathd-minor-fixes.patch
|
Patch0015: 0015-multipathd-function-return-value-tweaks.patch
|
||||||
Patch0016: 0016-multipathd-remove-useless-check-and-fix-format.patch
|
Patch0016: 0016-multipathd-minor-fixes.patch
|
||||||
Patch0017: 0017-multipathd-fix-memory-leak-on-error-in-configure.patch
|
Patch0017: 0017-multipathd-remove-useless-check-and-fix-format.patch
|
||||||
Patch0018: 0018-libmultipath-Don-t-blank-intialized-paths.patch
|
Patch0018: 0018-multipathd-fix-memory-leak-on-error-in-configure.patch
|
||||||
Patch0019: 0019-libmultipath-Fixup-updating-paths.patch
|
Patch0019: 0019-libmultipath-Don-t-blank-intialized-paths.patch
|
||||||
Patch0020: 0020-multipath-tweak-logging-style.patch
|
Patch0020: 0020-libmultipath-Fixup-updating-paths.patch
|
||||||
Patch0021: 0021-RH-fixup-udev-rules-for-redhat.patch
|
Patch0021: 0021-multipath-tweak-logging-style.patch
|
||||||
Patch0022: 0022-RH-Remove-the-property-blacklist-exception-builtin.patch
|
Patch0022: 0022-multipathd-check-for-NULL-udevice-in-cli_add_path.patch
|
||||||
Patch0023: 0023-RH-don-t-start-without-a-config-file.patch
|
Patch0023: 0023-libmultipath-remove-max_fds-code-duplication.patch
|
||||||
Patch0024: 0024-RH-use-rpm-optflags-if-present.patch
|
Patch0024: 0024-multipathd-set-return-code-for-multipathd-commands.patch
|
||||||
Patch0025: 0025-RH-add-mpathconf.patch
|
Patch0025: 0025-mpathpersist-fix-registration-rollback-issue.patch
|
||||||
Patch0026: 0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
Patch0026: 0026-RH-fixup-udev-rules-for-redhat.patch
|
||||||
Patch0027: 0027-RH-warn-on-invalid-regex-instead-of-failing.patch
|
Patch0027: 0027-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||||
Patch0028: 0028-RH-reset-default-find_mutipaths-value-to-off.patch
|
Patch0028: 0028-RH-don-t-start-without-a-config-file.patch
|
||||||
|
Patch0029: 0029-RH-use-rpm-optflags-if-present.patch
|
||||||
|
Patch0030: 0030-RH-add-mpathconf.patch
|
||||||
|
Patch0031: 0031-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||||
|
Patch0032: 0032-RH-warn-on-invalid-regex-instead-of-failing.patch
|
||||||
|
Patch0033: 0033-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||||
|
|
||||||
# runtime
|
# runtime
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
@ -120,7 +125,7 @@ This package contains the files needed to develop applications that use
|
|||||||
device-mapper-multipath's libdmmp C API library
|
device-mapper-multipath's libdmmp C API library
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n multipath-tools-1a8625a
|
%setup -q -n multipath-tools-b80318b
|
||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
%patch0003 -p1
|
%patch0003 -p1
|
||||||
@ -149,6 +154,11 @@ device-mapper-multipath's libdmmp C API library
|
|||||||
%patch0026 -p1
|
%patch0026 -p1
|
||||||
%patch0027 -p1
|
%patch0027 -p1
|
||||||
%patch0028 -p1
|
%patch0028 -p1
|
||||||
|
%patch0029 -p1
|
||||||
|
%patch0030 -p1
|
||||||
|
%patch0031 -p1
|
||||||
|
%patch0032 -p1
|
||||||
|
%patch0033 -p1
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -264,6 +274,18 @@ fi
|
|||||||
%{_pkgconfdir}/libdmmp.pc
|
%{_pkgconfdir}/libdmmp.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 9 2018 Benjamin Marzinski <bmarzins@redhat.com> 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
|
||||||
|
|
||||||
* Thu Sep 27 2018 Benjamin Marzinski <bmarzins@redhat.com> 0.7.7-6.git1a8625a
|
* Thu Sep 27 2018 Benjamin Marzinski <bmarzins@redhat.com> 0.7.7-6.git1a8625a
|
||||||
- Update Source to latest upstream commit
|
- Update Source to latest upstream commit
|
||||||
* Previous patches 0001-0011 are included in this commit
|
* Previous patches 0001-0011 are included in this commit
|
||||||
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (multipath-tools-1a8625a.tgz) = fc7763ec80f8df9ddafd2510dcc8cdc72f6870e5b3bad17e5580126042b5b4a3f4cbeb6517eb119c8ec82fed43dfd0def6a5e3cb60f08e7ad4f7802c169979ca
|
SHA512 (multipath-tools-b80318b.tgz) = 56fa87ea655c39f8edef35f6aa78e1f1c2b0c86e29e637b0e89761e02a67548cdf61cd6b62d62d78a797ff0c562ff4bdd0a5d03c13aeec6c1e80cac5a0a21f75
|
||||||
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942
|
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942
|
||||||
|
Loading…
Reference in New Issue
Block a user