aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2007-05-08 03:35:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:21 -0400
commit277866a0e3a4f97e859f7a621f5b4f5359c9526c (patch)
tree20b244f5c0c7b6a692f0290f70f0fefae9d88d5a /fs/nfs/write.c
parent79df3c19aa601d264719b04e3a788a7b852f4859 (diff)
nfs: fix congestion control: use atomic_longs
Change the atomic_t in struct nfs_server to atomic_long_t in anticipation of machines that can handle 8+TB of (4K) pages under writeback. However I suspect other things in NFS will start going *bang* by then. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 522cd413906e..de92b9509d94 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -224,7 +224,7 @@ static int nfs_set_page_writeback(struct page *page)
224 struct inode *inode = page->mapping->host; 224 struct inode *inode = page->mapping->host;
225 struct nfs_server *nfss = NFS_SERVER(inode); 225 struct nfs_server *nfss = NFS_SERVER(inode);
226 226
227 if (atomic_inc_return(&nfss->writeback) > 227 if (atomic_long_inc_return(&nfss->writeback) >
228 NFS_CONGESTION_ON_THRESH) 228 NFS_CONGESTION_ON_THRESH)
229 set_bdi_congested(&nfss->backing_dev_info, WRITE); 229 set_bdi_congested(&nfss->backing_dev_info, WRITE);
230 } 230 }
@@ -237,7 +237,7 @@ static void nfs_end_page_writeback(struct page *page)
237 struct nfs_server *nfss = NFS_SERVER(inode); 237 struct nfs_server *nfss = NFS_SERVER(inode);
238 238
239 end_page_writeback(page); 239 end_page_writeback(page);
240 if (atomic_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) { 240 if (atomic_long_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) {
241 clear_bdi_congested(&nfss->backing_dev_info, WRITE); 241 clear_bdi_congested(&nfss->backing_dev_info, WRITE);
242 congestion_end(WRITE); 242 congestion_end(WRITE);
243 } 243 }