Windows: log and invalidate invalid dir pages
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 22 Jan 2011 17:15:03 +0000 (12:15 -0500)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 23 Jan 2011 03:29:26 +0000 (19:29 -0800)
If when parsing a directory page in cm_ApplyDir the consistency
checks fail, log a message and invalidate the page in case
it was a transient failure.

Change-Id: Iab690cd876a717fbdef30fb78e4ed559fa7e0a5a
Reviewed-on: http://gerrit.openafs.org/3742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_vnodeops.c

index 450f753..d627636 100644 (file)
@@ -684,6 +684,12 @@ long cm_ApplyDir(cm_scache_t *scp, cm_DirFuncp_t funcp, void *parmp,
         if (dep->flag != CM_DIR_FFIRST ||
             strlen(dep->name) > 256) {
             code = CM_ERROR_INVAL;
+            osi_Log2(afsd_logp,
+                     "cm_ApplyDir invalid directory entry for scp %p bufp %p",
+                     scp, bufferp);
+            osi_Log4(afsd_logp,"... cell %u vol %u vnode %u uniq %u",
+                     scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
+            bufferp->dataVersion = CM_BUF_VERSION_BAD;
             break;
         }