vol-extra-logging-on-attach-detach-20030623
authorNathan Neulinger <nneul@umr.edu>
Mon, 23 Jun 2003 17:04:29 +0000 (17:04 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 23 Jun 2003 17:04:29 +0000 (17:04 +0000)
FIXES 1387

add extra logging, revert in cases where you don't have log level turned up

src/vol/volume.c

index ffcc645..d585af1 100644 (file)
@@ -285,9 +285,10 @@ int VInitVolumePackage(ProgramType pt, int nLargeVnodes, int nSmallVnodes,
                    if (error == VOFFLINE)
                        Log("Volume %d stays offline (/vice/offline/%s exists)\n", 
                            VolumeNumber(dp->d_name), dp->d_name);
-                   else 
+                   else if (LogLevel >= 5) {
                        Log("Partition %s: attached volume %d (%s)\n", diskP->name, 
                            VolumeNumber(dp->d_name), dp->d_name);
+                   }
                    if (vp) {
                        VPutVolume(vp);
                    }
@@ -359,6 +360,8 @@ void VShutdown_r(void)
            /* otherwise we go around again, trying another volume */
        }
        while(vp) {
+           if (LogLevel >= 5) 
+               Log("VShutdown:  Attempting to take volume %u offline.\n", vp->hashid);
            /* first compute np before releasing vp, in case vp disappears
             * after releasing.  Hold it, so it doesn't disapear.  If we
             * can't hold it, try the next one in the chain.  Invariant