|
|
a385ba |
---
|
|
|
a385ba |
libmpathpersist/mpath_persist.c | 11 +++++------
|
|
|
a385ba |
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
a385ba |
|
|
|
a385ba |
Index: multipath-tools-130222/libmpathpersist/mpath_persist.c
|
|
|
a385ba |
===================================================================
|
|
|
a385ba |
--- multipath-tools-130222.orig/libmpathpersist/mpath_persist.c
|
|
|
a385ba |
+++ multipath-tools-130222/libmpathpersist/mpath_persist.c
|
|
|
a385ba |
@@ -524,10 +524,10 @@ int mpath_prout_reg(struct multipath *mp
|
|
|
a385ba |
if (!rollback && (thread[i].param.status == MPATH_PR_RESERV_CONFLICT)){
|
|
|
a385ba |
rollback = 1;
|
|
|
a385ba |
sa_key = 0;
|
|
|
a385ba |
- for (i = 0; i < 8; ++i){
|
|
|
a385ba |
- if (i > 0)
|
|
|
a385ba |
+ for (j = 0; j < 8; ++j){
|
|
|
a385ba |
+ if (j > 0)
|
|
|
a385ba |
sa_key <<= 8;
|
|
|
a385ba |
- sa_key |= paramp->sa_key[i];
|
|
|
a385ba |
+ sa_key |= paramp->sa_key[j];
|
|
|
a385ba |
}
|
|
|
a385ba |
status = MPATH_PR_RESERV_CONFLICT ;
|
|
|
a385ba |
}
|
|
|
a385ba |
@@ -537,11 +537,10 @@ int mpath_prout_reg(struct multipath *mp
|
|
|
a385ba |
}
|
|
|
a385ba |
if (rollback && ((rq_servact == MPATH_PROUT_REG_SA) && sa_key != 0 )){
|
|
|
a385ba |
condlog (3, "%s: ERROR: initiating pr out rollback", mpp->wwid);
|
|
|
a385ba |
+ memcpy(¶mp->key, ¶mp->sa_key, 8);
|
|
|
a385ba |
+ memset(¶mp->sa_key, 0, 8);
|
|
|
a385ba |
for( i=0 ; i < count ; i++){
|
|
|
a385ba |
if (thread[i].param.status == MPATH_PR_SUCCESS) {
|
|
|
a385ba |
- memcpy(&thread[i].param.paramp->key, &thread[i].param.paramp->sa_key, 8);
|
|
|
a385ba |
- memset(&thread[i].param.paramp->sa_key, 0, 8);
|
|
|
a385ba |
- thread[i].param.status = MPATH_PR_SUCCESS;
|
|
|
a385ba |
rc = pthread_create(&thread[i].id, &attr, mpath_prout_pthread_fn,
|
|
|
a385ba |
(void *)(&thread[i].param));
|
|
|
a385ba |
if (rc){
|