Windows: notify file size change if flushed
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 17 Dec 2011 17:13:17 +0000 (12:13 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 18 Dec 2011 13:47:54 +0000 (05:47 -0800)
When processing AFS_INVALIDATE_FLUSHED, notify any listeners
that the file size has changed to force a complete refresh.

Change-Id: Ie5f0076ea786357ae77ef6a76f162c776d555953
Reviewed-on: http://gerrit.openafs.org/6364
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp

index 84cca30..7462d58 100644 (file)
@@ -1741,7 +1741,8 @@ AFSInvalidateCache( IN AFSInvalidateCacheCB *InvalidateCB)
                 ulFilter |= FILE_NOTIFY_CHANGE_SECURITY;
             }
 
-            if( InvalidateCB->Reason == AFS_INVALIDATE_DATA_VERSION)
+            if( InvalidateCB->Reason == AFS_INVALIDATE_DATA_VERSION ||
+                InvalidateCB->Reason == AFS_INVALIDATE_FLUSHED)
             {
                 ulFilter |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE;
             }
@@ -2476,7 +2477,8 @@ AFSInvalidateVolume( IN AFSVolumeCB *VolumeCB,
                     ulFilter |= FILE_NOTIFY_CHANGE_SECURITY;
                 }
 
-                if( Reason == AFS_INVALIDATE_DATA_VERSION)
+                if( Reason == AFS_INVALIDATE_DATA_VERSION ||
+                    Reason == AFS_INVALIDATE_FLUSHED)
                 {
                     ulFilter |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE;
                 }
@@ -2553,7 +2555,8 @@ AFSInvalidateVolume( IN AFSVolumeCB *VolumeCB,
                         ulFilter |= FILE_NOTIFY_CHANGE_SECURITY;
                     }
 
-                    if( Reason == AFS_INVALIDATE_DATA_VERSION)
+                    if( Reason == AFS_INVALIDATE_DATA_VERSION ||
+                        Reason == AFS_INVALIDATE_FLUSHED)
                     {
                         ulFilter |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE;
                     }