7 #include <asm/atomic.h>
8 #include <linux/nfs_fs_sb.h>
11 * Counters of total number and pending number of requests.
12 * When the total number of requests exceeds the soft limit, we start
13 * flushing out requests. If it exceeds the hard limit, we stall until
16 #define MAX_REQUEST_SOFT 192
17 #define MAX_REQUEST_HARD 256
20 * Maximum number of requests per write cluster.
21 * 32 requests per cluster account for 128K of data on an intel box.
22 * Note: it's a good idea to make this number smaller than MAX_REQUEST_SOFT.
24 * For 100Mbps Ethernet, 128 pages (i.e. 256K) per cluster gives much
27 #define REQUEST_HASH_SIZE 16
28 #define REQUEST_NR(off) ((off) >> PAGE_CACHE_SHIFT)
29 #define REQUEST_HASH(ino, off) (((ino) ^ REQUEST_NR(off)) & (REQUEST_HASH_SIZE - 1))
35 extern int nfs_reqlist_alloc(struct nfs_server
*);
36 extern void nfs_reqlist_free(struct nfs_server
*);
37 extern int nfs_reqlist_init(struct nfs_server
*);
38 extern void nfs_reqlist_exit(struct nfs_server
*);
39 extern void inode_schedule_scan(struct inode
*, unsigned long);
40 extern void inode_remove_flushd(struct inode
*);
41 extern void nfs_wake_flushd(void);
44 * This is the per-mount writeback cache.
49 wait_queue_head_t request_wait
;
51 /* The async RPC task that is responsible for scanning the
54 struct rpc_task
*task
; /* request flush task */
56 /* Authentication flavor handle for this NFS client */
57 struct rpc_auth
*auth
;
59 /* The list of all inodes with pending writebacks. */