windows-dv-logging-20071114
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 14 Nov 2007 17:18:25 +0000 (17:18 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 14 Nov 2007 17:18:25 +0000 (17:18 +0000)
64-bit data version logging updates

src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_dir.c
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_vnodeops.c

index a84750d..9904751 100644 (file)
@@ -1643,7 +1643,7 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie, int lock)
         {
            StringCbPrintfA(output, sizeof(output), 
                            "%s bp=0x%08X, hash=%d, fid (cell=%d, volume=%d, "
-                           "vnode=%d, unique=%d), offset=%x:%08x, dv=%d, "
+                           "vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
                            "flags=0x%x, cmFlags=0x%x, refCount=%d\r\n",
                             cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume, 
                             bp->fid.vnode, bp->fid.unique, bp->offset.HighPart, 
@@ -1661,7 +1661,7 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie, int lock)
     for(bp = cm_data.buf_freeListEndp; bp; bp=(cm_buf_t *) osi_QPrev(&bp->q)) {
        StringCbPrintfA(output, sizeof(output), 
                         "%s bp=0x%08X, fid (cell=%d, volume=%d, "
-                        "vnode=%d, unique=%d), offset=%x:%08x, dv=%d, "
+                        "vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
                         "flags=0x%x, cmFlags=0x%x, refCount=%d\r\n",
                         cookie, (void *)bp, bp->fid.cell, bp->fid.volume, 
                         bp->fid.vnode, bp->fid.unique, bp->offset.HighPart, 
@@ -1677,7 +1677,7 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie, int lock)
     for(bp = cm_data.buf_dirtyListEndp; bp; bp=(cm_buf_t *) osi_QPrev(&bp->q)) {
        StringCbPrintfA(output, sizeof(output), 
                         "%s bp=0x%08X, fid (cell=%d, volume=%d, "
-                        "vnode=%d, unique=%d), offset=%x:%08x, dv=%d, "
+                        "vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
                         "flags=0x%x, cmFlags=0x%x, refCount=%d\r\n",
                         cookie, (void *)bp, bp->fid.cell, bp->fid.volume, 
                         bp->fid.vnode, bp->fid.unique, bp->offset.HighPart, 
index c65bc9c..dfcc93c 100644 (file)
@@ -229,6 +229,7 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
 
     else if (errorCode == UAEWOULDBLOCK || errorCode == EWOULDBLOCK ||
               errorCode == UAEAGAIN || errorCode == EAGAIN) {
+       osi_Log0(afsd_logp, "cm_Analyze passed EWOULDBLOCK or EAGAIN.");
         if (timeLeft > 5 ) {
             thrd_Sleep(1000);
             retry = 1;
index dcc0752..e5b34b1 100644 (file)
@@ -1374,7 +1374,7 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp
         if ((bufp->dataVersion == -1 || bufp->dataVersion < scp->dataVersion) && 
              LargeIntegerGreaterThanOrEqualTo(bufp->offset, scp->serverLength)) 
         {
-            osi_Log3(afsd_logp, "Bad DVs %d, %d or length 0x%x",
+            osi_Log3(afsd_logp, "Bad DVs %I64d, %I64d or length 0x%x",
                       bufp->dataVersion, scp->dataVersion, biod.length);
 
             if (bufp->dataVersion == -1)
@@ -1396,7 +1396,7 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp
     }
 
 #ifdef DISKCACHE95
-    DPRINTF("cm_GetBuffer: fetching data scpDV=%d bufDV=%d scp=%x bp=%x dcp=%x\n",
+    DPRINTF("cm_GetBuffer: fetching data scpDV=%I64d bufDV=%I64d scp=%x bp=%x dcp=%x\n",
             scp->dataVersion, bufp->dataVersion, scp, bufp, bufp->dcp);
 #endif /* DISKCACHE95 */
 
index 6b04927..e7d26b7 100644 (file)
@@ -1150,7 +1150,7 @@ cm_CheckDirOpForSingleChange(cm_dirOp_t * op)
         osi_Log0(afsd_logp, "cm_CheckDirOpForSingleChange succeeded");
     else
         osi_Log3(afsd_logp,
-                 "cm_CheckDirOpForSingleChange failed.  code=0x%x, old dv=%d, new dv=%d",
+                 "cm_CheckDirOpForSingleChange failed.  code=0x%x, old dv=%I64d, new dv=%I64d",
                  code, op->dataVersion, op->scp->dataVersion);
     return rc;
 }
@@ -1271,7 +1271,8 @@ cm_DirOpAddBuffer(cm_dirOp_t * op, cm_buf_t * bufferp)
                          CM_SCACHESYNC_BUFLOCKED);
 
         if (code == 0 && bufferp->dataVersion != op->dataVersion) {
-            osi_Log2(afsd_logp, "cm_DirOpAddBuffer: buffer version mismatch. buf ver = %d. want %d", bufferp->dataVersion, op->dataVersion);
+            osi_Log2(afsd_logp, "cm_DirOpAddBuffer: buffer data version mismatch. buf dv = %I64d. needs %I64d", 
+                     bufferp->dataVersion, op->dataVersion);
 
             cm_SyncOpDone(op->scp, bufferp,
                           CM_SCACHESYNC_NEEDCALLBACK |
index 9d7bdbc..8a73b7e 100644 (file)
@@ -1786,7 +1786,7 @@ int cm_DumpSCache(FILE *outputFile, char *cookie, int lock)
   
     for (scp = cm_data.allSCachesp; scp; scp = scp->allNextp) 
     {
-        sprintf(output, "%s scp=0x%p, fid (cell=%d, volume=%d, vnode=%d, unique=%d) volp=0x%p type=%d dv=%d len=0x%I64x mp='%s' flags=0x%x cb=0x%x refCount=%u\r\n", 
+        sprintf(output, "%s scp=0x%p, fid (cell=%d, volume=%d, vnode=%d, unique=%d) volp=0x%p type=%d dv=%I64d len=0x%I64x mp='%s' flags=0x%x cb=0x%x refCount=%u\r\n", 
                 cookie, scp, scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique, 
                 scp->volp, scp->fileType, scp->dataVersion, scp->length.QuadPart, scp->mountPointStringp, scp->flags,
                 (unsigned long)scp->cbExpires, scp->refCount);
index edd7939..a491fa8 100644 (file)
@@ -4255,7 +4255,7 @@ long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
                 osi_Log0(afsd_logp,
                          "   attempting to UPGRADE from LockRead to LockWrite.");
                 osi_Log1(afsd_logp,
-                         "   dataVersion on scp: %d", scp->dataVersion);
+                         "   dataVersion on scp: %I64d", scp->dataVersion);
 
                 /* we assume at this point (because scp->serverLock
                    was valid) that we had a valid server lock. */
@@ -4346,7 +4346,7 @@ long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
                 osi_Log0(afsd_logp,
                          "  Data version mismatch while upgrading lock.");
                 osi_Log2(afsd_logp,
-                         "  Data versions before=%d, after=%d",
+                         "  Data versions before=%I64d, after=%I64d",
                          scp->lockDataVersion,
                          scp->dataVersion);
                 osi_Log1(afsd_logp,
@@ -4580,7 +4580,7 @@ long cm_UnlockByKey(cm_scache_t * scp,
         /* since scp->serverLock looked sane, we are going to assume
            that we have a valid server lock. */
         scp->lockDataVersion = scp->dataVersion;
-        osi_Log1(afsd_logp, "  dataVersion on scp = %d", scp->dataVersion);
+        osi_Log1(afsd_logp, "  dataVersion on scp = %I64d", scp->dataVersion);
 
         code = cm_IntReleaseLock(scp, userp, reqp);
 
@@ -4602,7 +4602,7 @@ long cm_UnlockByKey(cm_scache_t * scp,
                we have lost the lock we had during the transition. */
 
             osi_Log0(afsd_logp, "Data version mismatch during lock downgrade");
-            osi_Log2(afsd_logp, "  Data versions before=%d, after=%d",
+            osi_Log2(afsd_logp, "  Data versions before=%I64d, after=%I64d",
                      scp->lockDataVersion,
                      scp->dataVersion);
             
@@ -4757,7 +4757,7 @@ long cm_Unlock(cm_scache_t *scp,
         /* Since we already had a lock, we assume that there is a
            valid server lock. */
         scp->lockDataVersion = scp->dataVersion;
-        osi_Log1(afsd_logp, "   dataVersion on scp is %d", scp->dataVersion);
+        osi_Log1(afsd_logp, "   dataVersion on scp is %I64d", scp->dataVersion);
 
         /* before we downgrade, make sure that we have enough
            permissions to get the read lock. */
@@ -4792,7 +4792,7 @@ long cm_Unlock(cm_scache_t *scp,
             osi_Log0(afsd_logp,
                      "Data version mismatch while downgrading lock");
             osi_Log2(afsd_logp,
-                     "  Data versions before=%d, after=%d",
+                     "  Data versions before=%I64d, after=%I64d",
                      scp->lockDataVersion,
                      scp->dataVersion);
             
@@ -5030,7 +5030,7 @@ void cm_CheckLocks()
                                      "Data version mismatch on scp 0x%p",
                                      scp);
                             osi_Log2(afsd_logp,
-                                     "   Data versions: before=%d, after=%d",
+                                     "   Data versions: before=%I64d, after=%I64d",
                                      scp->lockDataVersion,
                                      scp->dataVersion);
 
@@ -5337,7 +5337,7 @@ long cm_RetryLock(cm_file_lock_t *oldFileLock, int client_is_dead)
                 osi_Log0(afsd_logp,
                          "  Data version mismatch while upgrading lock.");
                 osi_Log2(afsd_logp,
-                         "  Data versions before=%d, after=%d",
+                         "  Data versions before=%I64d, after=%I64d",
                          scp->lockDataVersion,
                          scp->dataVersion);
                 osi_Log1(afsd_logp,