]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-memcache-write-on-laststore-20090512
authorFelix Frank <Felix.Frank@Desy.de>
Tue, 12 May 2009 17:42:37 +0000 (17:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 12 May 2009 17:42:37 +0000 (17:42 +0000)
LICENSE IPL10
FIXES 124671

write back dirty pages on last store for memcache, lest we end up
unintentionally discarding the changes.

(cherry picked from commit 214ce7c8b488e90301e9f604b6ecc625b7000e62)

src/afs/afs_segments.c

index 3f74f6bfd60f0c88ae1347d0e5ebda899ee091df..27a26f9aa1ef27a24c22deb57e8fe66423f6f816 100644 (file)
@@ -195,7 +195,7 @@ afs_StoreAllSegments(register struct vcache *avc, struct vrequest *areq,
      * on the memcache case since that's we adjust the file's size
      * and finish flushing partial vm pages.
      */
-    if (cacheDiskType != AFS_FCACHE_TYPE_MEM)
+    if ((cacheDiskType != AFS_FCACHE_TYPE_MEM) || (sync & AFS_LASTSTORE))
 #endif /* !AFS_AIX32_ENV && !AFS_SGI65_ENV */
     {
        /* If we're not diskless, reading a file may stress the VM