mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
filter-mpath: handle other wwid types in blacklist
Fixes commit 494372b4ee
"filter-mpath: use multipath blacklist"
to handle wwids with initial type digits 1 and 2 used
for t10 and eui ids. Originally recognized type 3 naa.
This commit is contained in:
parent
bfe072e438
commit
c302903dba
@ -54,7 +54,7 @@ static void _read_blacklist_file(const char *path)
|
|||||||
int section_black = 0;
|
int section_black = 0;
|
||||||
int section_exceptions = 0;
|
int section_exceptions = 0;
|
||||||
int found_quote;
|
int found_quote;
|
||||||
int found_three;
|
int found_type;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (!(fp = fopen(path, "r")))
|
if (!(fp = fopen(path, "r")))
|
||||||
@ -114,7 +114,7 @@ static void _read_blacklist_file(const char *path)
|
|||||||
|
|
||||||
memset(wwid, 0, sizeof(wwid));
|
memset(wwid, 0, sizeof(wwid));
|
||||||
found_quote = 0;
|
found_quote = 0;
|
||||||
found_three = 0;
|
found_type = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
for (; i < MAX_WWID_LINE; i++) {
|
for (; i < MAX_WWID_LINE; i++) {
|
||||||
@ -132,9 +132,10 @@ static void _read_blacklist_file(const char *path)
|
|||||||
/* second quote is end of wwid */
|
/* second quote is end of wwid */
|
||||||
if ((line[i] == '"') && found_quote)
|
if ((line[i] == '"') && found_quote)
|
||||||
break;
|
break;
|
||||||
/* ignore first "3" in wwid */
|
/* exclude initial 3/2/1 for naa/eui/t10 */
|
||||||
if ((line[i] == '3') && !found_three) {
|
if (!j && !found_type &&
|
||||||
found_three = 1;
|
((line[i] == '3') || (line[i] == '2') || (line[i] == '1'))) {
|
||||||
|
found_type = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user