From 0b00aad684118d80aff3917f63f8ecf50ea308a1 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 25 Oct 2005 07:35:55 +0000 Subject: [PATCH] STABLE14-tbutc-solaris-and-vos-api-fixes-20051024 FIXES 22063 as tested for this and 22316 ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== FIXES 22316 the rest of this, since i forgot to apply the other file earlier oops (cherry picked from commit 834507571e397dc3a07550ef86ca2c159068d1ff) --- src/cf/osconf.m4 | 6 ++++++ src/libadmin/vos/afs_vosAdmin.c | 12 ++++++------ src/libadmin/vos/vosutils.c | 6 +++--- src/libadmin/vos/vosutils.h | 4 ++-- src/libadmin/vos/vsprocs.c | 28 ++++++++++++++-------------- src/tbutc/Makefile.in | 5 ++++- 6 files changed, 35 insertions(+), 26 deletions(-) diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index ce98b3adc..112be0d51 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -707,6 +707,7 @@ case $AFS_SYSNAME in XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" LD="/usr/ccs/bin/ld" SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + LWP_OPTMZ="-g" ;; sun4x_56) @@ -727,6 +728,7 @@ case $AFS_SYSNAME in XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + LWP_OPTMZ="-g" ;; sun4x_57) @@ -748,6 +750,7 @@ case $AFS_SYSNAME in XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + LWP_OPTMZ="-g" ;; sun4x_58) @@ -769,6 +772,7 @@ case $AFS_SYSNAME in XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + LWP_OPTMZ="-g" ;; sun4x_59) @@ -790,6 +794,7 @@ case $AFS_SYSNAME in XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + LWP_OPTMZ="-g" ;; sun4x_510) @@ -811,6 +816,7 @@ case $AFS_SYSNAME in XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + LWP_OPTMZ="-g" ;; sunx86_57) diff --git a/src/libadmin/vos/afs_vosAdmin.c b/src/libadmin/vos/afs_vosAdmin.c index c29eb13f5..058d30e80 100644 --- a/src/libadmin/vos/afs_vosAdmin.c +++ b/src/libadmin/vos/afs_vosAdmin.c @@ -1975,11 +1975,11 @@ vos_VLDBGet(const void *cellHandle, vos_MessageCallBack_t callBack, if (!ValidateVolumeName(volumeName, &tst)) { goto fail_vos_VLDBGet; } - if (!VLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) { + if (!aVLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) { goto fail_vos_VLDBGet; } } else { - if (!VLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) { + if (!aVLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) { goto fail_vos_VLDBGet; } } @@ -2919,7 +2919,7 @@ vos_VolumeCreate(const void *cellHandle, const void *serverHandle, * Check that the volume doesn't already exist */ - if (VLDB_GetEntryByName(c_handle, volumeName, &vinfo, &tst)) { + if (aVLDB_GetEntryByName(c_handle, volumeName, &vinfo, &tst)) { tst = ADMVOSVOLUMENAMEDUP; goto fail_vos_VolumeCreate; } @@ -3067,7 +3067,7 @@ vos_VolumeRename(const void *cellHandle, vos_MessageCallBack_t callBack, * Retrieve the entry */ - if (!VLDB_GetEntryByID(c_handle, readWriteVolumeId, -1, &entry, &tst)) { + if (!aVLDB_GetEntryByID(c_handle, readWriteVolumeId, -1, &entry, &tst)) { goto fail_vos_VolumeRename; } @@ -3261,7 +3261,7 @@ vos_VolumeRestore(const void *cellHandle, const void *serverHandle, */ if (volumeId != NULL) { - if (!VLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) { + if (!aVLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) { goto fail_vos_VolumeRestore; } volid = *volumeId; @@ -3289,7 +3289,7 @@ vos_VolumeRestore(const void *cellHandle, const void *serverHandle, close(fd); } - if (!VLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) { + if (!aVLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) { restoreflags = RV_FULLRST; } else if (Lp_GetRwIndex(c_handle, &entry, 0) == -1) { restoreflags = RV_FULLRST; diff --git a/src/libadmin/vos/vosutils.c b/src/libadmin/vos/vosutils.c index 4b62878a6..fbdb0e6d7 100644 --- a/src/libadmin/vos/vosutils.c +++ b/src/libadmin/vos/vosutils.c @@ -133,7 +133,7 @@ VLDB_CreateEntry(afs_cell_handle_p cellHandle, struct nvldbentry *entryp, } int -VLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, +aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, afs_int32 voltype, struct nvldbentry *entryp, afs_status_p st) { @@ -171,7 +171,7 @@ VLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, } int -VLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep, +aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep, struct nvldbentry *entryp, afs_status_p st) { struct vldbentry oentry; @@ -412,7 +412,7 @@ GetVolumeInfo(afs_cell_handle_p cellHandle, unsigned int volid, afs_status_t tst; int i, index = -1; - if (!VLDB_GetEntryByID(cellHandle, volid, -1, rentry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, volid, -1, rentry, &tst)) { rc = 0; goto fail_GetVolumeInfo; } diff --git a/src/libadmin/vos/vosutils.h b/src/libadmin/vos/vosutils.h index 5ae468f51..d886e12e9 100644 --- a/src/libadmin/vos/vosutils.h +++ b/src/libadmin/vos/vosutils.h @@ -15,12 +15,12 @@ extern int VLDB_CreateEntry(afs_cell_handle_p cellHandle, struct nvldbentry *entryp, afs_status_p st); -extern int VLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, +extern int aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, afs_int32 voltype, struct nvldbentry *entryp, afs_status_p st); -extern int VLDB_GetEntryByName(afs_cell_handle_p cellHandle, +extern int aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep, struct nvldbentry *entryp, afs_status_p st); diff --git a/src/libadmin/vos/vsprocs.c b/src/libadmin/vos/vsprocs.c index 76378c778..33eb73f64 100644 --- a/src/libadmin/vos/vsprocs.c +++ b/src/libadmin/vos/vsprocs.c @@ -239,7 +239,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server, } else { islocked = 1; - if (!VLDB_GetEntryByID(cellHandle, volumeId, avoltype, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, volumeId, avoltype, &entry, &tst)) { goto fail_UV_DeleteVolume; } @@ -427,7 +427,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, backupId = 0; newVol = 0; - if (!VLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) { goto fail_UV_MoveVolume; } @@ -443,7 +443,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, } islocked = 1; - if (!VLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) { goto fail_UV_MoveVolume; } @@ -890,7 +890,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, AFSVolEndTrans(fromconn, fromtid, &rcode); } - if (!VLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) { goto done; } @@ -1005,7 +1005,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver, /* the calls to VLDB will succeed only if avolid is a RW volume, * since we are following the RW hash chain for searching */ - if (!VLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) { goto fail_UV_BackupVolume; } @@ -1026,7 +1026,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver, vldblocked = 1; /* Reread the vldb entry */ - if (!VLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) { goto fail_UV_BackupVolume; } } @@ -1503,7 +1503,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, islocked = 1; /* Get the vldb entry in readable format */ - if (!VLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) { goto fail_UV_ReleaseVolume; } @@ -2118,7 +2118,7 @@ UV_DumpVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, fromcall = (struct rx_call *)0; islocked = 0; - if (!VLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) { goto fail_UV_DumpVolume; } @@ -2329,7 +2329,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver, pvolid = tovolid; toconn = UV_Bind(cellHandle, toserver, AFSCONF_VOLUMEPORT); if (pvolid == 0) { /*alot a new id if needed */ - VLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst); + aVLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst); if (tst == VL_NOENT) { tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid); @@ -2450,7 +2450,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver, /* Volume was restored on the file server, update the * VLDB to reflect the change. */ - VLDB_GetEntryByID(cellHandle, pvolid, RWVOL, &entry, &tst); + aVLDB_GetEntryByID(cellHandle, pvolid, RWVOL, &entry, &tst); if (tst && tst != VL_NOENT && tst != VL_ENTDELETED) { goto fail_UV_RestoreVolume; } @@ -2613,7 +2613,7 @@ UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, } islocked = 1; - if (!VLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) { goto fail_UV_AddSite; } if (!ISNAMEVALID(entry.name)) { @@ -2692,7 +2692,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, } islocked = 1; - if (!VLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) { + if (!aVLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) { goto fail_UV_RemoveSite; } if (!Lp_ROMatch(cellHandle, &entry, server, part, &tst)) { @@ -3006,7 +3006,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue, maxVolid += temp2; } - VLDB_GetEntryByID(cellHandle, elem.ids[RWVOL], RWVOL, &entry, &tst); + aVLDB_GetEntryByID(cellHandle, elem.ids[RWVOL], RWVOL, &entry, &tst); if (tst && (tst != VL_NOENT)) { noError = 0; totalCE++; @@ -3495,7 +3495,7 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry, } islocked = 1; - if (!VLDB_GetEntryByID + if (!aVLDB_GetEntryByID (cellHandle, entry->volumeId[RWVOL], RWVOL, entry, &tst)) { goto fail_CheckVldb; } diff --git a/src/tbutc/Makefile.in b/src/tbutc/Makefile.in index af7a09760..60e8ab1e6 100644 --- a/src/tbutc/Makefile.in +++ b/src/tbutc/Makefile.in @@ -24,7 +24,7 @@ VOLSER = ${srcdir}/../volser BUCOORDOBJS=ubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \ status.o ../bucoord/bucoord_errs.o -VOLSEROBJS=vsprocs.o +VOLSEROBJS=vsprocs.o vsutils.o VOLSERLIBS=${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a LWPOBJS =lock.o @@ -109,6 +109,9 @@ ubik_db_if.o: ${BUCOORD}/ubik_db_if.c status.o: ${BUCOORD}/status.c ${CC} ${CFLAGS} -c ${BUCOORD}/status.c +vsutils.o: ${VOLSER}/vsutils.c + ${CC} ${CFLAGS} -c ${VOLSER}/vsutils.c + vsprocs.o: ${VOLSER}/vsprocs.c ${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c -- 2.39.5