aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 13:16:30 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:39 -0400
commitc6a556b88adfacd2af90be84357c8165d716c27d (patch)
treeb63d477180052d3d1edabffb51f3fdfe4f699866 /include
parentab0a3dbedc51037f3d2e22ef67717a987b3d15e2 (diff)
[PATCH] NFS: Make searching and waiting on busy writeback requests more efficient.
Basically copies the VFS's method for tracking writebacks and applies it to the struct nfs_page. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_page.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 39e4895bcdb4..db40e4590ba2 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -20,6 +20,11 @@
20#include <asm/atomic.h> 20#include <asm/atomic.h>
21 21
22/* 22/*
23 * Valid flags for the radix tree
24 */
25#define NFS_PAGE_TAG_WRITEBACK 1
26
27/*
23 * Valid flags for a dirty buffer 28 * Valid flags for a dirty buffer
24 */ 29 */
25#define PG_BUSY 0 30#define PG_BUSY 0
@@ -62,6 +67,9 @@ extern int nfs_coalesce_requests(struct list_head *, struct list_head *,
62 unsigned int); 67 unsigned int);
63extern int nfs_wait_on_request(struct nfs_page *); 68extern int nfs_wait_on_request(struct nfs_page *);
64extern void nfs_unlock_request(struct nfs_page *req); 69extern void nfs_unlock_request(struct nfs_page *req);
70extern int nfs_set_page_writeback_locked(struct nfs_page *req);
71extern void nfs_clear_page_writeback(struct nfs_page *req);
72
65 73
66/* 74/*
67 * Lock the page of an asynchronous request without incrementing the wb_count 75 * Lock the page of an asynchronous request without incrementing the wb_count
@@ -96,10 +104,6 @@ nfs_list_remove_request(struct nfs_page *req)
96{ 104{
97 if (list_empty(&req->wb_list)) 105 if (list_empty(&req->wb_list))
98 return; 106 return;
99 if (!NFS_WBACK_BUSY(req)) {
100 printk(KERN_ERR "NFS: unlocked request attempted removed from list!\n");
101 BUG();
102 }
103 list_del_init(&req->wb_list); 107 list_del_init(&req->wb_list);
104 req->wb_list_head = NULL; 108 req->wb_list_head = NULL;
105} 109}