]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-shutdown-cleanup-20071213
authorDerrick Brashear <shadow@dementia.org>
Thu, 13 Dec 2007 19:18:29 +0000 (19:18 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 13 Dec 2007 19:18:29 +0000 (19:18 +0000)
LICENSE IPL10

get rid of cold_shutdown; it's in afs_prototypes.h.
log when we don't clean up memory

(cherry picked from commit b33fb96fff39c421064d03ff058dde76f2aeed8b)

13 files changed:
src/afs/AIX/osi_file.c
src/afs/AIX/osi_vfsops.c
src/afs/DARWIN/osi_file.c
src/afs/DUX/osi_file.c
src/afs/FBSD/osi_file.c
src/afs/HPUX/osi_file.c
src/afs/IRIX/osi_file.c
src/afs/IRIX/osi_vfsops.c
src/afs/LINUX/osi_file.c
src/afs/NBSD/osi_file.c
src/afs/SOLARIS/osi_file.c
src/afs/afs_buffer.c
src/afs/afs_osi_alloc.c

index 97e29583e8f797207ce97ea45e1c0e516e054187..7f5e60c68220524d2f801ea69ab58d32dca618bd 100644 (file)
@@ -272,8 +272,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index ad058f7519c8e3e4086f191da99a278a6563089b..9c51c6723838fcd39c541c4c651a79f4174ee656 100644 (file)
@@ -34,8 +34,6 @@ extern struct afs_exporter *afs_nfsexporter;
 struct vfs *afs_globalVFS = 0;
 struct vcache *afs_globalVp = 0;
 
-extern int afs_cold_shutdown;
-
 static int afs_root_nolock(struct vfs *afsp, struct vnode **avpp);
 
 static int
index eddbb5c4795563f4f422d0929caf6b001d5d0353..d0f2f197e9570eff3c10beacc1c95a40b548dfe6 100644 (file)
@@ -418,8 +418,6 @@ afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 450312ec10c2f46f45ff13f5876194459ccc77a0..87a34cc58ecfb02e3ff9f06ea771c0cedeba9b08 100644 (file)
@@ -279,8 +279,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 932e864613a4f22f036b36a16002d8f1ee3fca01..c7d759809306111af27674dc3c5d3625a1b02863 100644 (file)
@@ -244,8 +244,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 6b269b22095f2b61f2f0e5900ec60408a1ddb3b9..96365ab6488db266155c5c1a7c3f5ed4d1248bb8 100644 (file)
@@ -223,8 +223,6 @@ afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 0a91f9702be9b7d5d504c8351aff850119714fe0..988864cfd30ea53e3d33353e10abc10f2aa5240f 100644 (file)
@@ -262,8 +262,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index c1e29ebd6dcc7546b299321785bb83cfd70e0a77..ddab23488fd75de5101d76764bfd98020ccf6549 100644 (file)
@@ -207,7 +207,6 @@ afs_unmount(OSI_VFS_ARG(afsp), flags, cr)
      int flags;
      cred_t *cr;
 {
-    extern int afs_afs_cold_shutdown;
     struct vcache *tvc;
     vnode_t *vp, *rootvp = NULL;
     register struct afs_q *tq;
index 68e9ee3887471d5803e3b58bc55aed8c61a91cd7..d6b397466642608fa1b6ad6a0171318b12e397b1 100644 (file)
@@ -349,8 +349,6 @@ afs_osi_MapStrategy(int (*aproc) (struct buf * bp), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 81d58d54a394e69075bd4b2e02acdc5019fdd4b6..7f6a004e655b3c161859cedd40b4f7dde6002fb0 100644 (file)
@@ -224,8 +224,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 05c3e26cea1ba1f7b02c5593845b5bcb084a441c..3139e01ea2505284ad4d923dccd4812b27f6b965 100644 (file)
@@ -398,8 +398,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
 void
 shutdown_osifile(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osifile);
     if (afs_cold_shutdown) {
        afs_osicred_initialized = 0;
index 051cc600cbd51cdcf5cd58e497b1371d975bc54c..cc9053272add82c239f770eedbe1f7ed0c83854e 100644 (file)
@@ -534,7 +534,6 @@ shutdown_bufferpackage(void)
     register struct buffer *tp;
 #endif
     int i;
-    extern int afs_cold_shutdown;
 
     AFS_STATCNT(shutdown_bufferpackage);
     /* Free all allocated Buffers and associated buffer pages */
index 158bc32c7c3289541ff53af1567e5956d640b252..e7108a7e9f2be580d834c6df9d6b7ba42506b35d 100644 (file)
@@ -227,29 +227,34 @@ osi_AllocSmallSpace(size_t size)
 void
 shutdown_osinet(void)
 {
-    extern int afs_cold_shutdown;
-
     AFS_STATCNT(shutdown_osinet);
     if (afs_cold_shutdown) {
        struct osi_packet *tp;
 
        while ((tp = freePacketList)) {
            freePacketList = tp->next;
-           afs_osi_Free(tp, AFS_LRALLOCSIZ);
 #ifdef  KERNEL_HAVE_PIN
            unpin(tp, AFS_LRALLOCSIZ);
 #endif
+           afs_osi_Free(tp, AFS_LRALLOCSIZ);
        }
 
        while ((tp = freeSmallList)) {
            freeSmallList = tp->next;
-           afs_osi_Free(tp, AFS_SMALLOCSIZ);
 #ifdef  KERNEL_HAVE_PIN
            unpin(tp, AFS_SMALLOCSIZ);
 #endif
+           afs_osi_Free(tp, AFS_SMALLOCSIZ);
        }
        LOCK_INIT(&osi_fsplock, "osi_fsplock");
        LOCK_INIT(&osi_flplock, "osi_flplock");
     }
+    if (afs_stats_cmperf.LargeBlocksActive || 
+       afs_stats_cmperf.SmallBlocksActive) 
+    {
+       afs_warn("WARNING: not all blocks freed: large %d small %d\n", 
+                afs_stats_cmperf.LargeBlocksActive, 
+                afs_stats_cmperf.SmallBlocksActive);
+    }
 }
 #endif