From: Derrick Brashear Date: Mon, 8 Aug 2005 16:04:38 +0000 (+0000) Subject: STABLE14-revert-linux-write-dirty-pages-once-20050802 X-Git-Tag: openafs-devel-1_3_87~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5a44a9af70f1bbf929234cbdb18b1e1180f0d475;p=packages%2Fo%2Fopenafs.git STABLE14-revert-linux-write-dirty-pages-once-20050802 this needs to be revisited (cherry picked from commit 3e9c1b1f1a1b3d33c6af44d1fe79810ad2a3a0f8) --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 67e2621a2..6f2166001 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -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,