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 hard limit, we stall
13 * until it drops again.
15 #define MAX_REQUEST_HARD 256
18 * Maximum number of requests per write cluster.
19 * 32 requests per cluster account for 128K of data on an intel box.
20 * Note: it's a good idea to make this number smaller than MAX_REQUEST_SOFT.
22 * For 100Mbps Ethernet, 128 pages (i.e. 256K) per cluster gives much
25 #define REQUEST_HASH_SIZE 16
26 #define REQUEST_NR(off) ((off) >> PAGE_CACHE_SHIFT)
27 #define REQUEST_HASH(ino, off) (((ino) ^ REQUEST_NR(off)) & (REQUEST_HASH_SIZE - 1))
33 extern int nfs_reqlist_alloc(struct nfs_server *);
34 extern void nfs_reqlist_free(struct nfs_server *);
35 extern void nfs_reqlist_exit(struct nfs_server *);
36 extern void nfs_wake_flushd(void);
39 * This is the per-mount writeback cache.
44 wait_queue_head_t request_wait;
46 /* The async RPC task that is responsible for scanning the
49 struct rpc_task *task; /* request flush task */
51 /* Authentication flavor handle for this NFS client */
52 struct rpc_auth *auth;
54 /* The list of all inodes with pending writebacks. */