Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
multipath-tools
> multipath-tools-increase-rdac-priority
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File multipath-tools-increase-rdac-priority of Package multipath-tools
diff --git a/libprio/rdac.c b/libprio/rdac.c index d7c19a9..810864a 100644 --- a/libprio/rdac.c +++ b/libprio/rdac.c @@ -40,9 +40,9 @@ int rdac_prio(const char *dev, int fd) pp_rdac_log(0, "inquiry command indicates error"); goto out; } - + if (/* Verify the code page - right page & page identifier */ - sense_buffer[1] != 0xc9 || + sense_buffer[1] != 0xc9 || sense_buffer[3] != 0x2c || sense_buffer[4] != 'v' || sense_buffer[5] != 'a' || @@ -50,14 +50,14 @@ int rdac_prio(const char *dev, int fd) pp_rdac_log(0, "volume access control page in unknown format"); goto out; } - + if ( /* Current Volume Path Bit */ ( sense_buffer[8] & 0x01) == 0x01 ) { - /* + /* * This volume was owned by the controller receiving * the inquiry command. */ - ret |= 0x01; + ret |= 0x04; } /* Volume Preferred Path Priority */ @@ -75,12 +75,13 @@ int rdac_prio(const char *dev, int fd) * as a secondary path. Typically this path would be used * for fail-over situations. */ - /* Fallthrough */ + ret |= 0x01; + break; default: /* Reserved values */ break; } - + out: return(ret); } diff --git a/path_priority/pp_rdac/pp_rdac.c b/path_priority/pp_rdac/pp_rdac.c index 49a13cf..9bd5928 100644 --- a/path_priority/pp_rdac/pp_rdac.c +++ b/path_priority/pp_rdac/pp_rdac.c @@ -68,7 +68,7 @@ int rdac_prio(const char *dev) * This volume was owned by the controller receiving * the inquiry command. */ - ret |= 0x01; + ret |= 0x04; } /* Volume Preferred Path Priority */ @@ -86,7 +86,8 @@ int rdac_prio(const char *dev) * as a secondary path. Typically this path would be used * for fail-over situations. */ - /* Fallthrough */ + ret |= 0x01; + break; default: /* Reserved values */ break;