|
|
ecd2a9 |
---
|
|
|
ecd2a9 |
libmultipath/dict.c | 97 ----------------------------------------------------
|
|
|
ecd2a9 |
1 file changed, 97 deletions(-)
|
|
|
ecd2a9 |
|
|
|
ecd2a9 |
Index: multipath-tools-130222/libmultipath/dict.c
|
|
|
ecd2a9 |
===================================================================
|
|
|
ecd2a9 |
--- multipath-tools-130222.orig/libmultipath/dict.c
|
|
|
ecd2a9 |
+++ multipath-tools-130222/libmultipath/dict.c
|
|
|
ecd2a9 |
@@ -473,26 +473,6 @@ def_checker_timeout_handler(vector strve
|
|
|
ecd2a9 |
static int
|
|
|
ecd2a9 |
def_pg_timeout_handler(vector strvec)
|
|
|
ecd2a9 |
{
|
|
|
ecd2a9 |
- int pg_timeout;
|
|
|
ecd2a9 |
- char * buff;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- buff = set_value(strvec);
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (!buff)
|
|
|
ecd2a9 |
- return 1;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (strlen(buff) == 4 && !strcmp(buff, "none"))
|
|
|
ecd2a9 |
- conf->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
ecd2a9 |
- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
|
|
|
ecd2a9 |
- if (pg_timeout == 0)
|
|
|
ecd2a9 |
- conf->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
ecd2a9 |
- else
|
|
|
ecd2a9 |
- conf->pg_timeout = pg_timeout;
|
|
|
ecd2a9 |
- }
|
|
|
ecd2a9 |
- else
|
|
|
ecd2a9 |
- conf->pg_timeout = PGTIMEOUT_UNDEF;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- FREE(buff);
|
|
|
ecd2a9 |
return 0;
|
|
|
ecd2a9 |
}
|
|
|
ecd2a9 |
|
|
|
ecd2a9 |
@@ -1358,30 +1338,6 @@ hw_minio_rq_handler(vector strvec)
|
|
|
ecd2a9 |
static int
|
|
|
ecd2a9 |
hw_pg_timeout_handler(vector strvec)
|
|
|
ecd2a9 |
{
|
|
|
ecd2a9 |
- int pg_timeout;
|
|
|
ecd2a9 |
- struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
|
|
|
ecd2a9 |
- char *buff;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (!hwe)
|
|
|
ecd2a9 |
- return 1;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- buff = set_value(strvec);
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (!buff)
|
|
|
ecd2a9 |
- return 1;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (strlen(buff) == 4 && !strcmp(buff, "none"))
|
|
|
ecd2a9 |
- hwe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
ecd2a9 |
- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
|
|
|
ecd2a9 |
- if (pg_timeout == 0)
|
|
|
ecd2a9 |
- hwe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
ecd2a9 |
- else
|
|
|
ecd2a9 |
- hwe->pg_timeout = pg_timeout;
|
|
|
ecd2a9 |
- }
|
|
|
ecd2a9 |
- else
|
|
|
ecd2a9 |
- hwe->pg_timeout = PGTIMEOUT_UNDEF;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- FREE(buff);
|
|
|
ecd2a9 |
return 0;
|
|
|
ecd2a9 |
}
|
|
|
ecd2a9 |
|
|
|
ecd2a9 |
@@ -1819,29 +1775,6 @@ mp_minio_rq_handler(vector strvec)
|
|
|
ecd2a9 |
static int
|
|
|
ecd2a9 |
mp_pg_timeout_handler(vector strvec)
|
|
|
ecd2a9 |
{
|
|
|
ecd2a9 |
- int pg_timeout;
|
|
|
ecd2a9 |
- struct mpentry *mpe = VECTOR_LAST_SLOT(conf->mptable);
|
|
|
ecd2a9 |
- char *buff;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (!mpe)
|
|
|
ecd2a9 |
- return 1;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- buff = set_value(strvec);
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (!buff)
|
|
|
ecd2a9 |
- return 1;
|
|
|
ecd2a9 |
- if (strlen(buff) == 4 && !strcmp(buff, "none"))
|
|
|
ecd2a9 |
- mpe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
ecd2a9 |
- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
|
|
|
ecd2a9 |
- if (pg_timeout == 0)
|
|
|
ecd2a9 |
- mpe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
ecd2a9 |
- else
|
|
|
ecd2a9 |
- mpe->pg_timeout = pg_timeout;
|
|
|
ecd2a9 |
- }
|
|
|
ecd2a9 |
- else
|
|
|
ecd2a9 |
- mpe->pg_timeout = PGTIMEOUT_UNDEF;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- FREE(buff);
|
|
|
ecd2a9 |
return 0;
|
|
|
ecd2a9 |
}
|
|
|
ecd2a9 |
|
|
|
ecd2a9 |
@@ -2180,16 +2113,6 @@ snprint_mp_rr_min_io_rq (char * buff, in
|
|
|
ecd2a9 |
static int
|
|
|
ecd2a9 |
snprint_mp_pg_timeout (char * buff, int len, void * data)
|
|
|
ecd2a9 |
{
|
|
|
ecd2a9 |
- struct mpentry * mpe = (struct mpentry *)data;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- switch (mpe->pg_timeout) {
|
|
|
ecd2a9 |
- case PGTIMEOUT_UNDEF:
|
|
|
ecd2a9 |
- break;
|
|
|
ecd2a9 |
- case -PGTIMEOUT_NONE:
|
|
|
ecd2a9 |
- return snprintf(buff, len, "\"none\"");
|
|
|
ecd2a9 |
- default:
|
|
|
ecd2a9 |
- return snprintf(buff, len, "%i", mpe->pg_timeout);
|
|
|
ecd2a9 |
- }
|
|
|
ecd2a9 |
return 0;
|
|
|
ecd2a9 |
}
|
|
|
ecd2a9 |
|
|
|
ecd2a9 |
@@ -2551,19 +2474,6 @@ snprint_hw_rr_min_io_rq (char * buff, in
|
|
|
ecd2a9 |
static int
|
|
|
ecd2a9 |
snprint_hw_pg_timeout (char * buff, int len, void * data)
|
|
|
ecd2a9 |
{
|
|
|
ecd2a9 |
- struct hwentry * hwe = (struct hwentry *)data;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- if (!hwe->pg_timeout)
|
|
|
ecd2a9 |
- return 0;
|
|
|
ecd2a9 |
-
|
|
|
ecd2a9 |
- switch (hwe->pg_timeout) {
|
|
|
ecd2a9 |
- case PGTIMEOUT_UNDEF:
|
|
|
ecd2a9 |
- break;
|
|
|
ecd2a9 |
- case -PGTIMEOUT_NONE:
|
|
|
ecd2a9 |
- return snprintf(buff, len, "\"none\"");
|
|
|
ecd2a9 |
- default:
|
|
|
ecd2a9 |
- return snprintf(buff, len, "%i", hwe->pg_timeout);
|
|
|
ecd2a9 |
- }
|
|
|
ecd2a9 |
return 0;
|
|
|
ecd2a9 |
}
|
|
|
ecd2a9 |
|
|
|
ecd2a9 |
@@ -2895,13 +2805,6 @@ snprint_def_checker_timeout (char *buff,
|
|
|
ecd2a9 |
static int
|
|
|
ecd2a9 |
snprint_def_pg_timeout (char * buff, int len, void * data)
|
|
|
ecd2a9 |
{
|
|
|
ecd2a9 |
- switch (conf->pg_timeout) {
|
|
|
ecd2a9 |
- case PGTIMEOUT_UNDEF:
|
|
|
ecd2a9 |
- case -PGTIMEOUT_NONE:
|
|
|
ecd2a9 |
- return snprintf(buff, len, "\"none\"");
|
|
|
ecd2a9 |
- default:
|
|
|
ecd2a9 |
- return snprintf(buff, len, "%i", conf->pg_timeout);
|
|
|
ecd2a9 |
- }
|
|
|
ecd2a9 |
return 0;
|
|
|
ecd2a9 |
}
|
|
|
ecd2a9 |
|