]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Merge changes for 1.2.5
authorSam Hartman <hartmans@debian.org>
Mon, 10 Jun 2002 12:02:03 +0000 (12:02 +0000)
committerSam Hartman <hartmans@debian.org>
Mon, 10 Jun 2002 12:02:03 +0000 (12:02 +0000)
src/afs/afs_call.c
src/afs/afs_pioctl.c
src/libafs/Makefile.common
src/libafs/MakefileProto.LINUX.in
src/viced/afsfileprocs.c

index b9fea5a8ff6d831196ea178e3b74021ebc6b8747..e31a7604f49fb2f0a6994d76429be2030a4a8f8c 100644 (file)
@@ -10,7 +10,7 @@
 #include <afsconfig.h>
 #include "../afs/param.h"
 
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_call.c,v 1.11 2002/05/12 05:50:41 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_call.c,v 1.12 2002/06/10 12:02:02 hartmans Exp $");
 
 #include "../afs/sysincludes.h"        /* Standard vendor system headers */
 #include "../afs/afsincludes.h"        /* Afs-based standard headers */
@@ -544,10 +544,9 @@ long parm, parm2, parm3, parm4, parm5, parm6;
 #endif
        afs_cold_shutdown = 0;
        if (parm == 1) afs_cold_shutdown = 1;
-       if (afs_globalVFS != 0) {
-           afs_warn("AFS isn't unmounted yet! Call aborted\n");
-           code = EACCES;
-       }
+       if (afs_globalVFS != 0) 
+           afs_warn("AFS isn't unmounted yet!\n");
+
        afs_shutdown();
     }
 
index bcb386192966b2291c30936b8a1a3677a48f4e43..0381083632a979a4648dbbd9f83b6b8d9c8e56c2 100644 (file)
@@ -10,7 +10,7 @@
 #include <afsconfig.h>
 #include "../afs/param.h"
 
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_pioctl.c,v 1.12 2002/05/12 05:50:42 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_pioctl.c,v 1.13 2002/06/10 12:02:03 hartmans Exp $");
 
 #include "../afs/sysincludes.h"        /* Standard vendor system headers */
 #include "../afs/afsincludes.h"        /* Afs-based standard headers */
@@ -1414,7 +1414,8 @@ static PGCPAGs(avc, afun, areq, ain, aout, ainSize, aoutSize, acred)
       memcpy((char *)&flag, ain, sizeof(afs_int32));           /* primary id flag */
       ain += sizeof(afs_int32);                        /* skip id field */
       /* rest is cell name, look it up */
-      if (flag & 0x8000) {                     /* XXX Use Constant XXX */
+      /* some versions of gcc appear to need != 0 in order to get this right */
+      if (flag & 0x8000 != 0) {                        /* XXX Use Constant XXX */
          flag &= ~0x8000;
          set_parent_pag = 1;
       }
index 9f1afd2ac1f60aa0e99c3a55c4bd5ae1757d1844..d3c68d1cca781f9fc1c5f989d7d6c71c6d68c09a 100644 (file)
@@ -91,7 +91,9 @@ AFSAOBJS = \
        afs_volume.o \
        afsaux.o                \
        Kvice.xdr.o     \
+       xdr_array.o     \
        xdr_arrayn.o    \
+       xdr_int64.o     \
        Kvice.cs.o      \
        fcrypt.o                \
        rx.o            \
@@ -118,6 +120,7 @@ AFSAOBJS = \
        rxkad_client.o  \
        rxkad_common.o  \
        xdr_afsuuid.o   \
+       xdr.o           \
        afs_uuid.o $(AFS_OS_OBJS)
 
 # These next two allow nfs and nonfs builds to occur in the same directory.
@@ -307,6 +310,12 @@ afsaux.o: $(AFSINT)/afsaux.c
        $(CRULE1);
 xdr_arrayn.o: $(RX)/xdr_arrayn.c
        $(CRULE1);
+xdr_array.o: $(RX)/xdr_array.c
+       $(CRULE1);
+xdr_int64.o: $(RX)/xdr_int64.c
+       $(CRULE1);
+xdr.o: $(RX)/xdr.c
+       $(CRULE1);
 Kvldbint.cs.o: $(AFSINT)/Kvldbint.cs.c
        $(CRULE1);
 Kvldbint.xdr.o: $(AFSINT)/Kvldbint.xdr.c
index 3e51e79f6d7868a4330b9f625528350895472273..f983e12b0bec9cfafd8e3c62ae6a3ad10bbdf3bd 100644 (file)
@@ -42,10 +42,7 @@ AFS_OS_OBJS = \
        osi_sysctl.o \
        osi_vfsops.o \
        osi_vm.o \
-       osi_vnodeops.o \
-       xdr.o \
-       xdr_array.o \
-       xdr_int64.o
+       osi_vnodeops.o
 
 AFS_OS_NFSOBJS =
 
@@ -310,9 +307,3 @@ osi_vm.o: $(AFS)/osi_vm.c
        $(CRULE1)
 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
        $(CRULE1)
-xdr.o: $(RX)/xdr.c
-       $(CRULE1)
-xdr_int64.o: $(RX)/xdr_int64.c
-       $(CRULE1)
-xdr_array.o: $(RX)/xdr_array.c
-       $(CRULE1)
index 77d82b03dc42dfb1ecab231185320fce20ac1636..78dc7cedde9b70cb3dfaac3d1008c81ff344cc85 100644 (file)
@@ -28,7 +28,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID("$Header: /tmp/cvstemp/openafs/src/viced/afsfileprocs.c,v 1.8 2002/05/12 05:50:44 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/viced/afsfileprocs.c,v 1.9 2002/06/10 12:02:03 hartmans Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -1715,6 +1715,7 @@ SAFSS_RemoveFile (tcon, DirFid, Name, OutDirStatus, Sync)
     struct client *t_client;            /* tmp ptr to client data */
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
 
+    FidZero(&dir);
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -1783,6 +1784,7 @@ SAFSS_RemoveFile (tcon, DirFid, Name, OutDirStatus, Sync)
 Bad_RemoveFile: 
     /* Update and store volume/vnode and parent vnodes back */
     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
+    FidZap(&dir);
     ViceLog(2, ("SAFS_RemoveFile returns %d\n",        errorCode)); 
     return errorCode;
 
@@ -1877,6 +1879,8 @@ SAFSS_CreateFile (tcon, DirFid, Name, InStatus, OutFid, OutFidStatus,
     struct client *t_client;            /* tmp ptr to client data */
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
 
+    FidZero(&dir);
+
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -1944,6 +1948,7 @@ SAFSS_CreateFile (tcon, DirFid, Name, InStatus, OutFid, OutFidStatus,
 Bad_CreateFile:
     /* Update and store volume/vnode and parent vnodes back */
     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
+    FidZap(&dir);
     ViceLog(2, ("SAFS_CreateFile returns %d\n",        errorCode)); 
     return errorCode;
 
@@ -2055,6 +2060,11 @@ SAFSS_Rename (tcon, OldDirFid, OldName, NewDirFid, NewName, OutOldDirStatus,
     struct client *t_client;            /* tmp ptr to client data */
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
 
+    FidZero(&olddir);
+    FidZero(&newdir);
+    FidZero(&filedir);
+    FidZero(&newfiledir);
+
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -2404,6 +2414,10 @@ Bad_Rename:
     }
     PutVolumePackage(fileptr, (newvptr && newvptr != oldvptr? newvptr : 0),
                     oldvptr, volptr);
+    FidZap(&olddir);
+    FidZap(&newdir);
+    FidZap(&filedir);
+    FidZap(&newfiledir);
     ViceLog(2, ("SAFS_Rename returns %d\n", errorCode));
     return errorCode;
 
@@ -2503,6 +2517,8 @@ SAFSS_Symlink (tcon, DirFid, Name, LinkContents, InStatus, OutFid, OutFidStatus,
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
     FdHandle_t *fdP;
 
+    FidZero(&dir);
+
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -2594,6 +2610,7 @@ SAFSS_Symlink (tcon, DirFid, Name, LinkContents, InStatus, OutFid, OutFidStatus,
 Bad_SymLink: 
     /* Write the all modified vnodes (parent, new files) and volume back */
     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
+    FidZap(&dir);
     ViceLog(2, ("SAFS_Symlink returns %d\n", errorCode));
     return errorCode;
 
@@ -2690,6 +2707,8 @@ SAFSS_Link (tcon, DirFid, Name, ExistingFid, OutFidStatus, OutDirStatus, Sync)
     struct client *t_client;            /* tmp ptr to client data */
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
 
+    FidZero(&dir);
+
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -2794,6 +2813,7 @@ SAFSS_Link (tcon, DirFid, Name, ExistingFid, OutFidStatus, OutDirStatus, Sync)
 Bad_Link:
     /* Write the all modified vnodes (parent, new files) and volume back */
     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
+    FidZap(&dir);
     ViceLog(2, ("SAFS_Link returns %d\n", errorCode));
     return errorCode;
 
@@ -2894,6 +2914,9 @@ SAFSS_MakeDir (tcon, DirFid, Name, InStatus, OutFid, OutFidStatus,
     struct client *t_client;            /* tmp ptr to client data */
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
 
+    FidZero(&dir);
+    FidZero(&parentdir);
+
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -2964,7 +2987,7 @@ SAFSS_MakeDir (tcon, DirFid, Name, InStatus, OutFid, OutFidStatus,
     Update_TargetVnodeStatus(targetptr, TVS_MKDIR, client, InStatus,
                             parentptr, volptr, 0);
 
-    /* Actually create the New directory in the directory package */
+    /* Actually create the New directory in the directory package */ 
     SetDirHandle(&dir, targetptr);
     assert(!(MakeDir(&dir, OutFid, DirFid)));
     DFlush();
@@ -2987,6 +3010,8 @@ SAFSS_MakeDir (tcon, DirFid, Name, InStatus, OutFid, OutFidStatus,
 Bad_MakeDir: 
     /* Write the all modified vnodes (parent, new files) and volume back */
     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
+    FidZap(&dir);
+    FidZap(&parentdir);
     ViceLog(2, ("SAFS_MakeDir returns %d\n", errorCode)); 
     return errorCode;
 
@@ -3082,6 +3107,8 @@ SAFSS_RemoveDir (tcon, DirFid, Name, OutDirStatus, Sync)
     struct client *t_client;            /* tmp ptr to client data */
     struct in_addr logHostAddr;                /* host ip holder for inet_ntoa */
 
+    FidZero(&dir);
+
     /* Get ptr to client data for user Id for logging */
     t_client = (struct client *) rx_GetSpecific(tcon, rxcon_client_key); 
     logHostAddr.s_addr =  rx_HostOf(rx_PeerOf(tcon));
@@ -3146,6 +3173,7 @@ SAFSS_RemoveDir (tcon, DirFid, Name, OutDirStatus, Sync)
 Bad_RemoveDir: 
     /* Write the all modified vnodes (parent, new files) and volume back */
     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
+    FidZap(&dir);
     ViceLog(2, ("SAFS_RemoveDir        returns %d\n", errorCode));
     return errorCode;
 
@@ -6572,6 +6600,7 @@ int CopyOnWrite(targetptr, volptr)
                    ViceLog(0,("CopyOnWrite failed: volume %u in partition %s  (tried reading %u, read %u, wrote %u, errno %u) volume needs salvage\n",
                               V_id(volptr), volptr->partition->name, length,
                               rdlen, wrlen, errno));
+                   assert(0);
                     /* Decrement this inode so salvager doesn't find it. */
                    FDH_REALLYCLOSE(newFdP);
                    IH_RELEASE(newH);