vsprocs: Remove dead code

Remove the dead code in UV_VolumeMove() commented out with the macro
ENABLE_BUGFIX_1165.

Remove two commented out lines of code in UV_ConvertRO().

Change-Id: Ic628c74df011b0f09be6b03f72ab1baac5e59caf
Reviewed-on: https://gerrit.openafs.org/14004
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Michael Meffie 2019-12-27 11:53:05 -05:00 committed by Benjamin Kaduk
parent 56aa396d83
commit 6779e30d37

View File

@ -1322,7 +1322,6 @@ UV_ConvertRO(afs_uint32 server, afs_uint32 partition, afs_uint32 volid,
if (entry->serverFlags[i] & VLSF_RWVOL) {
rwindex = i;
rwserver = entry->serverNumber[i];
/* rwpartition = entry->serverPartition[i]; */
if (roserver)
break;
} else if ((entry->serverFlags[i] & VLSF_ROVOL) && !roserver) {
@ -1337,7 +1336,6 @@ UV_ConvertRO(afs_uint32 server, afs_uint32 partition, afs_uint32 volid,
if (same) {
roindex = i;
roserver = entry->serverNumber[i];
/* ropartition = entry->serverPartition[i]; */
if (rwserver)
break;
}
@ -1465,11 +1463,6 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
int same;
char hoststr[16];
#ifdef ENABLE_BUGFIX_1165
volEntries volumeInfo;
struct volintInfo *infop = 0;
#endif
islocked = 0;
fromconn = (struct rx_connection *)0;
toconn = (struct rx_connection *)0;
@ -1698,26 +1691,6 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
fromDate = 0;
}
#ifdef ENABLE_BUGFIX_1165
/*
* Get the internal volume state from the source volume. We'll use such info (i.e. dayUse)
* to copy it to the new volume (via AFSSetInfo later on) so that when we move volumes we
* don't use this information...
*/
volumeInfo.volEntries_val = (volintInfo *) 0; /*this hints the stub to allocate space */
volumeInfo.volEntries_len = 0;
code = AFSVolListOneVolume(fromconn, afrompart, afromvol, &volumeInfo);
EGOTO1(mfail, code,
"Failed to get the volint Info of the cloned volume %u\n",
afromvol);
infop = (volintInfo *) volumeInfo.volEntries_val;
infop->maxquota = -1; /* Else it will replace the default quota */
infop->creationDate = -1; /* Else it will use the source creation date */
infop->updateDate = -1; /* Else it will use the source update date */
#endif
/* create a volume on the target machine */
volid = afromvol;
code = DoVolDelete(toconn, volid, atopart,
@ -1823,15 +1796,6 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
"Failed to set the flags to make new source volume online\n");
VDONE;
#ifdef ENABLE_BUGFIX_1165
VPRINT1("Setting volume status on destination volume %u ...", volid);
code = AFSVolSetInfo(toconn, totid, infop);
EGOTO1(mfail, code,
"Failed to set volume status on the destination volume %u\n",
volid);
VDONE;
#endif
/* put new volume online */
VPRINT1("Ending transaction on destination volume %u ...", afromvol);
code = AFSVolEndTrans(toconn, totid, &rcode);
@ -2040,10 +2004,6 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
}
if (volName)
free(volName);
#ifdef ENABLE_BUGFIX_1165
if (infop)
free(infop);
#endif
if (fromconn)
rx_DestroyConnection(fromconn);
if (toconn)
@ -2191,10 +2151,6 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
done: /* routine cleanup */
if (volName)
free(volName);
#ifdef ENABLE_BUGFIX_1165
if (infop)
free(infop);
#endif
if (fromconn)
rx_DestroyConnection(fromconn);
if (toconn)