Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=277866a0e3a4f97e859f7a621f5b4f5359c9526c
Commit:     277866a0e3a4f97e859f7a621f5b4f5359c9526c
Parent:     79df3c19aa601d264719b04e3a788a7b852f4859
Author:     Peter Zijlstra <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:35:12 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:21 2007 -0700

    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 <[EMAIL PROTECTED]>
    Cc: Trond Myklebust <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/nfs/write.c            |    4 ++--
 include/linux/nfs_fs_sb.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 522cd41..de92b95 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -224,7 +224,7 @@ static int nfs_set_page_writeback(struct page *page)
                struct inode *inode = page->mapping->host;
                struct nfs_server *nfss = NFS_SERVER(inode);
 
-               if (atomic_inc_return(&nfss->writeback) >
+               if (atomic_long_inc_return(&nfss->writeback) >
                                NFS_CONGESTION_ON_THRESH)
                        set_bdi_congested(&nfss->backing_dev_info, WRITE);
        }
@@ -237,7 +237,7 @@ static void nfs_end_page_writeback(struct page *page)
        struct nfs_server *nfss = NFS_SERVER(inode);
 
        end_page_writeback(page);
-       if (atomic_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) {
+       if (atomic_long_dec_return(&nfss->writeback) < 
NFS_CONGESTION_OFF_THRESH) {
                clear_bdi_congested(&nfss->backing_dev_info, WRITE);
                congestion_end(WRITE);
        }
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index c95d5e6..52b4378 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -82,7 +82,7 @@ struct nfs_server {
        struct rpc_clnt *       client_acl;     /* ACL RPC client handle */
        struct nfs_iostats *    io_stats;       /* I/O statistics */
        struct backing_dev_info backing_dev_info;
-       atomic_t                writeback;      /* number of writeback pages */
+       atomic_long_t           writeback;      /* number of writeback pages */
        int                     flags;          /* various flags */
        unsigned int            caps;           /* server capabilities */
        unsigned int            rsize;          /* read size */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to