~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/nfs_flushd.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef NFS_CLUSTER_H
  2 #define NFS_CLUSTER_H
  3 
  4 
  5 
  6 #ifdef __KERNEL__
  7 #include <asm/atomic.h>
  8 #include <linux/nfs_fs_sb.h>
  9 
 10 /*
 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
 14  * it drops again.
 15  */
 16 #define MAX_REQUEST_SOFT        192
 17 #define MAX_REQUEST_HARD        256
 18 
 19 /*
 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.
 23  *
 24  * For 100Mbps Ethernet, 128 pages (i.e. 256K) per cluster gives much
 25  * better performance.
 26  */
 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))
 30 
 31 
 32 /*
 33  * Functions
 34  */
 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);
 42 
 43 /*
 44  * This is the per-mount writeback cache.
 45  */
 46 struct nfs_reqlist {
 47         atomic_t                nr_requests;
 48         unsigned long           runat;
 49         wait_queue_head_t       request_wait;
 50 
 51         /* The async RPC task that is responsible for scanning the
 52          * requests.
 53          */
 54         struct rpc_task         *task;          /* request flush task */
 55 
 56         /* Authentication flavor handle for this NFS client */
 57         struct rpc_auth         *auth;
 58 
 59         /* The list of all inodes with pending writebacks.  */
 60         struct inode            *inodes;
 61 };
 62 
 63 #endif
 64 
 65 #endif
 66 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.