]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: ObjectInfoCB update last access time
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 13 Apr 2013 05:55:26 +0000 (01:55 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 26 Apr 2013 13:23:36 +0000 (06:23 -0700)
Each time the ObjectInformationCB object is looked up
from the ObjectInfoTree the LastAccessCount field should be updated
except in cases of invalidation, garbage collection, and extent
processing.  This is particularly important when an ObjectInfoCB
is attached to DirectoryCB in AFSInitDirEntry and when constructing
directory snapshots or validating directory content.

Change-Id: Ife412b723a1bdc922ffdfeca71061fcfd1ce721a
Reviewed-on: http://gerrit.openafs.org/9784
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSCommSupport.cpp
src/WINNT/afsrdr/kernel/lib/AFSDirControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSFSControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp

index c7ba719b15f7e51685bf5e94da5076c7bca9de36..e11fecd00a7553fcb70febf6cb1de1c76adb25c6 100644 (file)
@@ -1017,6 +1017,8 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
 
                         SetFlag( pDirNode->Flags, AFS_DIR_ENTRY_VALID);
 
+                        KeQueryTickCount( &ObjectInfoCB->LastAccessCount);
+
                         if( pCurrentDirEntry->ShortNameLength > 0 &&
                             pDirNode->NameInformation.ShortNameLength > 0)
                         {
index 39ddc080823f29e7dbce3e862b787e419a0dc7e6..2ef7b71e6bb1596f733124d91863c1f31f7b98f5 100644 (file)
@@ -1699,6 +1699,12 @@ AFSSnapshotDirectory( IN AFSFcb *Fcb,
                 pSnapshotEntry->NameHash = (ULONG)pDirEntry->CaseSensitiveTreeEntry.HashIndex;
 
                 pSnapshotEntry++;
+
+                if ( pDirEntry->ObjectInformation != NULL)
+                {
+
+                    KeQueryTickCount( &pDirEntry->ObjectInformation->LastAccessCount);
+                }
             }
             else
             {
index 16012f7ebad651472002ae35d6bc862a6a3f9db1..dc1414146cbabfc15e1b116598b320e7d342dac2 100644 (file)
@@ -1023,6 +1023,8 @@ AFSProcessUserFsRequest( IN PIRP Irp)
                                   "AFSProcessUserFsRequest Increment count on object %p Cnt %d\n",
                                   pParentObjectInfo,
                                   lCount));
+
+                    KeQueryTickCount( &pParentObjectInfo->LastAccessCount);
                 }
 
                 AFSReleaseResource( pFcb->ObjectInformation->VolumeCB->ObjectInfoTree.TreeLock);
index 6417b19c39794aef9a0d3a047216c1b5411e179b..42770e6ac376f1c09209d97e7b98f865acd20dbe 100644 (file)
@@ -1159,6 +1159,8 @@ AFSInitDirEntry( IN AFSObjectInfoCB *ParentObjectInfo,
                       pObjectInfoCB,
                       lCount));
 
+        KeQueryTickCount( &pObjectInfoCB->LastAccessCount);
+
         AFSReleaseResource( ParentObjectInfo->VolumeCB->ObjectInfoTree.TreeLock);
 
         ntStatus = STATUS_SUCCESS;
@@ -8040,6 +8042,8 @@ AFSGetObjectStatus( IN AFSGetStatusInfoCB *GetStatusInfo,
                                   "AFSGetObjectStatus Increment2 count on object %p Cnt %d\n",
                                   pObjectInfo,
                                   lCount));
+
+                    KeQueryTickCount( &pObjectInfo->LastAccessCount);
                 }
 
                 AFSReleaseResource( pVolumeCB->ObjectInfoTree.TreeLock);