--- linux-2.4.23-rc1/fs/nfs/write.c.orig 2003-11-16 19:24:23.000000000 -0500 +++ linux-2.4.23-rc1/fs/nfs/write.c 2004-01-09 16:25:18.000000000 -0500 @@ -746,6 +746,7 @@ nfs_update_request(struct file* file, st static void nfs_strategy(struct inode *inode) { +#if 0 unsigned int dirty, wpages; dirty = inode->u.nfs_i.ndirty; @@ -760,6 +761,7 @@ nfs_strategy(struct inode *inode) if (dirty >= NFS_STRATEGY_PAGES * wpages) nfs_flush_file(inode, NULL, 0, 0, 0); #endif +#endif } int @@ -849,8 +851,19 @@ nfs_updatepage(struct file *file, struct SetPageUptodate(page); nfs_unlock_request(req); nfs_strategy(inode); - } else + } else { + /* If we are not locking, and the page is up to date, + * we may write out the entire page for efficiency. + */ + if (Page_Uptodate(page) && inode->i_flock == 0) { + req->wb_offset = 0; + if (page->index < (inode->i_size >> PAGE_CACHE_SHIFT)) + req->wb_bytes = PAGE_CACHE_SIZE; + else + req->wb_bytes = inode->i_size & PAGE_CACHE_MASK; + } nfs_unlock_request(req); + } done: dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n", status, (long long)inode->i_size);