]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-revert-linux-write-dirty-pages-once-20050802
authorDerrick Brashear <shadow@dementia.org>
Mon, 8 Aug 2005 16:04:38 +0000 (16:04 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 8 Aug 2005 16:04:38 +0000 (16:04 +0000)
this needs to be revisited

(cherry picked from commit 3e9c1b1f1a1b3d33c6af44d1fe79810ad2a3a0f8)

src/afs/LINUX/osi_vnodeops.c

index 67e2621a2cebd47a849bae13d6ab71ab994aa9f1..6f21660010d15cf40532a634aeb6f394109a09e5 100644 (file)
@@ -1376,6 +1376,16 @@ afs_linux_writepage_sync(struct inode *ip, struct page *pp,
     ip->i_size = vcp->m.Length;
     ip->i_blocks = ((vcp->m.Length + 1023) >> 10) << 1;
 
+    if (!code
+       && afs_stats_cmperf.cacheCurrDirtyChunks >
+       afs_stats_cmperf.cacheMaxDirtyChunks) {
+       struct vrequest treq;
+
+       ObtainWriteLock(&vcp->lock, 533);
+       if (!afs_InitReq(&treq, credp))
+           code = afs_DoPartialWrite(vcp, &treq);
+       ReleaseWriteLock(&vcp->lock);
+    }
     code = code ? -code : count - tuio.uio_resid;
 
     afs_Trace4(afs_iclSetp, CM_TRACE_UPDATEPAGE, ICL_TYPE_POINTER, vcp,