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