|
|
4728c8 |
---
|
|
|
4728c8 |
libmultipath/prio.c | 7 +++++++
|
|
|
4728c8 |
libmultipath/prio.h | 1 +
|
|
|
4728c8 |
libmultipath/prioritizers/alua_rtpg.c | 5 +++--
|
|
|
4728c8 |
libmultipath/prioritizers/emc.c | 2 +-
|
|
|
4728c8 |
libmultipath/prioritizers/hds.c | 2 +-
|
|
|
4728c8 |
libmultipath/prioritizers/hp_sw.c | 2 +-
|
|
|
4728c8 |
libmultipath/prioritizers/ontap.c | 4 ++--
|
|
|
4728c8 |
libmultipath/prioritizers/rdac.c | 2 +-
|
|
|
4728c8 |
multipath.conf.annotated | 5 +++--
|
|
|
4728c8 |
multipath/multipath.conf.5 | 4 ++--
|
|
|
4728c8 |
10 files changed, 22 insertions(+), 12 deletions(-)
|
|
|
4728c8 |
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prio.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prio.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prio.c
|
|
|
4728c8 |
@@ -10,6 +10,13 @@
|
|
|
4728c8 |
|
|
|
4728c8 |
static LIST_HEAD(prioritizers);
|
|
|
4728c8 |
|
|
|
4728c8 |
+unsigned int get_prio_timeout(unsigned int default_timeout)
|
|
|
4728c8 |
+{
|
|
|
4728c8 |
+ if (conf->checker_timeout)
|
|
|
4728c8 |
+ return conf->checker_timeout * 1000;
|
|
|
4728c8 |
+ return default_timeout;
|
|
|
4728c8 |
+}
|
|
|
4728c8 |
+
|
|
|
4728c8 |
int init_prio (void)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
if (!add_prio(DEFAULT_PRIO))
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prio.h
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prio.h
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prio.h
|
|
|
4728c8 |
@@ -51,6 +51,7 @@ struct prio {
|
|
|
4728c8 |
int (*getprio)(struct path *, char *);
|
|
|
4728c8 |
};
|
|
|
4728c8 |
|
|
|
4728c8 |
+unsigned int get_prio_timeout(unsigned int default_timeout);
|
|
|
4728c8 |
int init_prio (void);
|
|
|
4728c8 |
void cleanup_prio (void);
|
|
|
4728c8 |
struct prio * add_prio (char *);
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prioritizers/alua_rtpg.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prioritizers/alua_rtpg.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prioritizers/alua_rtpg.c
|
|
|
4728c8 |
@@ -21,6 +21,7 @@
|
|
|
4728c8 |
#define __user
|
|
|
4728c8 |
#include <scsi/sg.h>
|
|
|
4728c8 |
|
|
|
4728c8 |
+#include "../prio.h"
|
|
|
4728c8 |
#include "alua_rtpg.h"
|
|
|
4728c8 |
|
|
|
4728c8 |
#define SENSE_BUFF_LEN 32
|
|
|
4728c8 |
@@ -134,7 +135,7 @@ do_inquiry(int fd, int evpd, unsigned in
|
|
|
4728c8 |
hdr.dxfer_len = resplen;
|
|
|
4728c8 |
hdr.sbp = sense;
|
|
|
4728c8 |
hdr.mx_sb_len = sizeof(sense);
|
|
|
4728c8 |
- hdr.timeout = DEF_TIMEOUT;
|
|
|
4728c8 |
+ hdr.timeout = get_prio_timeout(DEF_TIMEOUT);
|
|
|
4728c8 |
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &hdr) < 0) {
|
|
|
4728c8 |
PRINT_DEBUG("do_inquiry: IOCTL failed!\n");
|
|
|
4728c8 |
@@ -253,7 +254,7 @@ do_rtpg(int fd, void* resp, long resplen
|
|
|
4728c8 |
hdr.dxfer_len = resplen;
|
|
|
4728c8 |
hdr.mx_sb_len = sizeof(sense);
|
|
|
4728c8 |
hdr.sbp = sense;
|
|
|
4728c8 |
- hdr.timeout = DEF_TIMEOUT;
|
|
|
4728c8 |
+ hdr.timeout = get_prio_timeout(DEF_TIMEOUT);
|
|
|
4728c8 |
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &hdr) < 0)
|
|
|
4728c8 |
return -RTPG_RTPG_FAILED;
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prioritizers/emc.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prioritizers/emc.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prioritizers/emc.c
|
|
|
4728c8 |
@@ -31,7 +31,7 @@ int emc_clariion_prio(const char *dev, i
|
|
|
4728c8 |
io_hdr.dxferp = sense_buffer;
|
|
|
4728c8 |
io_hdr.cmdp = inqCmdBlk;
|
|
|
4728c8 |
io_hdr.sbp = sb;
|
|
|
4728c8 |
- io_hdr.timeout = 60000;
|
|
|
4728c8 |
+ io_hdr.timeout = get_prio_timeout(60000);
|
|
|
4728c8 |
io_hdr.pack_id = 0;
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
|
|
4728c8 |
pp_emc_log(0, "sending query command failed");
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prioritizers/hds.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prioritizers/hds.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prioritizers/hds.c
|
|
|
4728c8 |
@@ -114,7 +114,7 @@ int hds_modular_prio (const char *dev, i
|
|
|
4728c8 |
io_hdr.dxferp = inqBuff;
|
|
|
4728c8 |
io_hdr.cmdp = inqCmdBlk;
|
|
|
4728c8 |
io_hdr.sbp = sense_buffer;
|
|
|
4728c8 |
- io_hdr.timeout = 2000; /* TimeOut = 2 seconds */
|
|
|
4728c8 |
+ io_hdr.timeout = get_prio_timeout(2000); /* TimeOut = 2 seconds */
|
|
|
4728c8 |
|
|
|
4728c8 |
if (ioctl (fd, SG_IO, &io_hdr) < 0) {
|
|
|
4728c8 |
pp_hds_log(0, "SG_IO error");
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prioritizers/hp_sw.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prioritizers/hp_sw.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prioritizers/hp_sw.c
|
|
|
4728c8 |
@@ -46,7 +46,7 @@ int hp_sw_prio(const char *dev, int fd)
|
|
|
4728c8 |
io_hdr.dxfer_direction = SG_DXFER_NONE;
|
|
|
4728c8 |
io_hdr.cmdp = turCmdBlk;
|
|
|
4728c8 |
io_hdr.sbp = sb;
|
|
|
4728c8 |
- io_hdr.timeout = 60000;
|
|
|
4728c8 |
+ io_hdr.timeout = get_prio_timeout(60000);
|
|
|
4728c8 |
io_hdr.pack_id = 0;
|
|
|
4728c8 |
retry:
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prioritizers/ontap.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prioritizers/ontap.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prioritizers/ontap.c
|
|
|
4728c8 |
@@ -89,7 +89,7 @@ static int send_gva(const char *dev, int
|
|
|
4728c8 |
io_hdr.dxferp = results;
|
|
|
4728c8 |
io_hdr.cmdp = cdb;
|
|
|
4728c8 |
io_hdr.sbp = sb;
|
|
|
4728c8 |
- io_hdr.timeout = SG_TIMEOUT;
|
|
|
4728c8 |
+ io_hdr.timeout = get_prio_timeout(SG_TIMEOUT);
|
|
|
4728c8 |
io_hdr.pack_id = 0;
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
|
|
4728c8 |
pp_ontap_log(0, "SG_IO ioctl failed, errno=%d", errno);
|
|
|
4728c8 |
@@ -141,7 +141,7 @@ static int get_proxy(const char *dev, in
|
|
|
4728c8 |
io_hdr.dxferp = results;
|
|
|
4728c8 |
io_hdr.cmdp = cdb;
|
|
|
4728c8 |
io_hdr.sbp = sb;
|
|
|
4728c8 |
- io_hdr.timeout = SG_TIMEOUT;
|
|
|
4728c8 |
+ io_hdr.timeout = get_prio_timeout(SG_TIMEOUT);
|
|
|
4728c8 |
io_hdr.pack_id = 0;
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
|
|
4728c8 |
pp_ontap_log(0, "ioctl sending inquiry command failed, "
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/prioritizers/rdac.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/prioritizers/rdac.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/prioritizers/rdac.c
|
|
|
4728c8 |
@@ -31,7 +31,7 @@ int rdac_prio(const char *dev, int fd)
|
|
|
4728c8 |
io_hdr.dxferp = sense_buffer;
|
|
|
4728c8 |
io_hdr.cmdp = inqCmdBlk;
|
|
|
4728c8 |
io_hdr.sbp = sb;
|
|
|
4728c8 |
- io_hdr.timeout = 60000;
|
|
|
4728c8 |
+ io_hdr.timeout = get_prio_timeout(60000);
|
|
|
4728c8 |
io_hdr.pack_id = 0;
|
|
|
4728c8 |
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
|
|
|
4728c8 |
pp_rdac_log(0, "sending inquiry command failed");
|
|
|
4728c8 |
Index: multipath-tools-130222/multipath.conf.annotated
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/multipath.conf.annotated
|
|
|
4728c8 |
+++ multipath-tools-130222/multipath.conf.annotated
|
|
|
4728c8 |
@@ -188,8 +188,9 @@
|
|
|
4728c8 |
# #
|
|
|
4728c8 |
# # name : checker_timeout
|
|
|
4728c8 |
# # scope : multipath & multipathd
|
|
|
4728c8 |
-# # desc : The timeout to use for path checkers that issue scsi
|
|
|
4728c8 |
-# # commands with an explicit timeout, in seconds.
|
|
|
4728c8 |
+# # desc : The timeout to use for path checkers and prioritizers
|
|
|
4728c8 |
+# # that issue scsi commands with an explicit timeout, in
|
|
|
4728c8 |
+# # seconds.
|
|
|
4728c8 |
# # values : n > 0
|
|
|
4728c8 |
# # default : taken from /sys/block/sd<x>/device/timeout
|
|
|
4728c8 |
# checker_timeout 60
|
|
|
4728c8 |
Index: multipath-tools-130222/multipath/multipath.conf.5
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/multipath/multipath.conf.5
|
|
|
4728c8 |
+++ multipath-tools-130222/multipath/multipath.conf.5
|
|
|
4728c8 |
@@ -321,8 +321,8 @@ maximum number of open fds is taken from
|
|
|
4728c8 |
if that number is greated than 1024.
|
|
|
4728c8 |
.TP
|
|
|
4728c8 |
.B checker_timeout
|
|
|
4728c8 |
-Specify the timeout to user for path checkers that issue scsi commands with an
|
|
|
4728c8 |
-explicit timeout, in seconds; default taken from
|
|
|
4728c8 |
+Specify the timeout to use for path checkers and prioritizers that issue scsi
|
|
|
4728c8 |
+commands with an explicit timeout, in seconds; default taken from
|
|
|
4728c8 |
.I /sys/block/sd<x>/device/timeout
|
|
|
4728c8 |
.TP
|
|
|
4728c8 |
.B fast_io_fail_tmo
|