From: Mark Vitale Date: Tue, 8 May 2012 14:01:12 +0000 (-0400) Subject: vos: convertROtoRW may create two RW volumes X-Git-Tag: upstream/1.8.0_pre1^2~2406 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9a728fd86c7add13e15dfa0d3062fa94cc77c53f;p=packages%2Fo%2Fopenafs.git vos: convertROtoRW may create two RW volumes If the RW volume is listed after the RO convert target in the VLDB, the code failed to detect that an RW is already present and would create a second RW volume. Change-Id: Ia77004214c4d1b18699b5527bc1fc928e8e1143d Reviewed-on: http://gerrit.openafs.org/7385 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/volser/vos.c b/src/volser/vos.c index 0010a1bff..89dbe9e44 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -5564,8 +5564,9 @@ ConvertRO(struct cmd_syndesc *as, void *arock) rwindex = i; rwserver = entry.serverNumber[i]; rwpartition = entry.serverPartition[i]; - } - if (entry.serverFlags[i] & ITSROVOL) { + if (roserver) + break; + } else if ((entry.serverFlags[i] & ITSROVOL) && !roserver) { same = VLDB_IsSameAddrs(server, entry.serverNumber[i], &code); if (code) { fprintf(STDERR, @@ -5577,7 +5578,8 @@ ConvertRO(struct cmd_syndesc *as, void *arock) roindex = i; roserver = entry.serverNumber[i]; ropartition = entry.serverPartition[i]; - break; + if (rwserver) + break; } } }