("Volumes not found in main hash tables in vldb will be fixed...\n");
memset(&updateentry, 0, sizeof(updateentry));
for (index = 0; 1; index = next_index) {
- /* FIXME: n2 is never changed for some reason */
- int n1 = 0, n2 = 0, n3 = 0, n4 = 0;
memset(&entry, 0, sizeof(entry));
code =
ubik_VL_ListEntry(cstruct, 0, index, &count,
&tentry);
if (code == VL_NOENT) {
num1++;
- n1 = 1;
updateentry.Mask = VLUPDATE_VOLNAMEHASH;
printf("\tVolume %s %d (not in namehash)\n",
entry.name, entry.volumeId[RWVOL]);
}
x++;
}
- if (entry.volumeId[BACKVOL] && !n2) {
+ if (entry.volumeId[BACKVOL]) {
code =
ubik_VL_GetEntryByID(cstruct, 0,
entry.volumeId[BACKVOL], BACKVOL,
&tentry);
if (code == VL_NOENT) {
- n3 = 1;
num1++;
updateentry.Mask = VLUPDATE_BACKUPID;
updateentry.BackupId = entry.volumeId[BACKVOL];
}
}
}
- if (entry.volumeId[ROVOL && !n2]) {
+ if (entry.volumeId[ROVOL]) {
code =
ubik_VL_GetEntryByID(cstruct, 0,
entry.volumeId[ROVOL], ROVOL, &tentry);
if (code == VL_NOENT) {
- n4 = 1;
num1++;
updateentry.Mask = VLUPDATE_READONLYID;
updateentry.ReadOnlyId = entry.volumeId[ROVOL];
if (verbose)
quiet_println("Verify each volume entry\n");
for (i = 0; i < maxentries; i++) {
- int nextp = 0;
- int reft = 0;
int hash = 0;
int nexthash = 0;
- afs_uint32 *nextpp = NULL;
char *which = NULL;
if (record[i].type == 0)
vlentry.name, record[i].addr);
if (!(record[i].type & NH)) {
- nextp = ADDR(vlentry.nextNameHash);
- reft = REFN;
hash = NameHash(vlentry.name);
- nextpp = &vlentry.nextNameHash;
which = "name";
volidbuf[0]='\0';
foundbad = 1;
}
if (vlentry.volumeId[0] && !(record[i].type & RWH)) {
- nextp = ADDR(vlentry.nextIdHash[0]);
- reft = REFRW;
hash = IdHash(vlentry.volumeId[0]);
- nextpp = &(vlentry.nextIdHash[0]);
which = "RW";
sprintf(volidbuf, "id %u ", vlentry.volumeId[0]);
foundbad = 1;
}
if (vlentry.volumeId[1] && !(record[i].type & ROH)) {
- nextp = ADDR(vlentry.nextIdHash[1]);
- reft = REFRO;
hash = IdHash(vlentry.volumeId[1]);
- nextpp = &(vlentry.nextIdHash[1]);
which = "RO";
sprintf(volidbuf, "id %u ", vlentry.volumeId[1]);
foundbad = 1;
}
if (vlentry.volumeId[2] && !(record[i].type & BKH)) {
- nextp = ADDR(vlentry.nextIdHash[2]);
- reft = REFBK;
hash = IdHash(vlentry.volumeId[2]);
- nextpp = &(vlentry.nextIdHash[2]);
which = "BK";
sprintf(volidbuf, "id %u ", vlentry.volumeId[2]);
foundbad = 1;
if (!validVolumeAddr(vlentry.nextNameHash) ||
record[ADDR(vlentry.nextNameHash)].type & MULTN) {
- nextp = ADDR(vlentry.nextNameHash);
- reft = REFN;
hash = NameHash(vlentry.name);
- nextpp = &vlentry.nextNameHash;
which = "name";
volidbuf[0]='\0';
if (validVolumeAddr(vlentry.nextNameHash)) {
if (!validVolumeAddr(vlentry.nextIdHash[0]) ||
record[ADDR(vlentry.nextIdHash[0])].type & MULTRW) {
- nextp = ADDR(vlentry.nextIdHash[0]);
- reft = REFRW;
hash = IdHash(vlentry.volumeId[0]);
- nextpp = &(vlentry.nextIdHash[0]);
which = "RW";
sprintf(volidbuf, "id %u ", vlentry.volumeId[0]);
if (validVolumeAddr(vlentry.nextIdHash[0])) {
if (!validVolumeAddr(vlentry.nextIdHash[1]) ||
record[ADDR(vlentry.nextIdHash[1])].type & MULTRO) {
- nextp = ADDR(vlentry.nextIdHash[1]);
- reft = REFRO;
hash = IdHash(vlentry.volumeId[1]);
- nextpp = &(vlentry.nextIdHash[1]);
which = "RO";
sprintf(volidbuf, "id %u ", vlentry.volumeId[1]);
if (validVolumeAddr(vlentry.nextIdHash[1])) {
if (!validVolumeAddr(vlentry.nextIdHash[2]) ||
record[ADDR(vlentry.nextIdHash[2])].type & MULTBK) {
- nextp = ADDR(vlentry.nextIdHash[2]);
- reft = REFBK;
hash = IdHash(vlentry.volumeId[2]);
- nextpp = &(vlentry.nextIdHash[2]);
which = "BK";
sprintf(volidbuf, "id %u ", vlentry.volumeId[2]);
if (validVolumeAddr(vlentry.nextIdHash[2])) {