aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-05 16:25:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-05 16:25:45 -0500
commitcc7889ff5ee7a1c1a2b5073c53db5ad9b76f14e2 (patch)
tree647e11872abe7c20c0145de9adbb60f15085dad0 /include
parentb13d3c6e8ab6ac53e8c1858a9c837cb6ba3bbef0 (diff)
parent3fa04ecd72780da31ba8b329e148179bc24a9c7d (diff)
Merge branch 'nfs-for-2.6.34' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.34' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (44 commits) NFS: Remove requirement for inode->i_mutex from nfs_invalidate_mapping NFS: Clean up nfs_sync_mapping NFS: Simplify nfs_wb_page() NFS: Replace __nfs_write_mapping with sync_inode() NFS: Simplify nfs_wb_page_cancel() NFS: Ensure inode is always marked I_DIRTY_DATASYNC, if it has unstable pages NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is set NFS: Reduce the number of unnecessary COMMIT calls NFS: Add a count of the number of unstable writes carried by an inode NFS: Cleanup - move nfs_write_inode() into fs/nfs/write.c nfs41 fix NFS4ERR_CLID_INUSE for exchange id NFS: Fix an allocation-under-spinlock bug SUNRPC: Handle EINVAL error returns from the TCP connect operation NFSv4.1: Various fixes to the sequence flag error handling nfs4: renewd renew operations should take/put a client reference nfs41: renewd sequence operations should take/put client reference nfs: prevent backlogging of renewd requests nfs: kill renewd before clearing client minor version NFS: Make close(2) asynchronous when closing NFS O_DIRECT files NFS: Improve NFS iostat byte count accuracy for writes ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h14
-rw-r--r--include/linux/nfs_fs_sb.h2
-rw-r--r--include/linux/sunrpc/bc_xprt.h15
3 files changed, 18 insertions, 13 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index d09db1bc9083..1a0b85aa151e 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -33,9 +33,6 @@
33#define FLUSH_STABLE 4 /* commit to stable storage */ 33#define FLUSH_STABLE 4 /* commit to stable storage */
34#define FLUSH_LOWPRI 8 /* low priority background flush */ 34#define FLUSH_LOWPRI 8 /* low priority background flush */
35#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ 35#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */
36#define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */
37#define FLUSH_INVALIDATE 64 /* Invalidate the page cache */
38#define FLUSH_NOWRITEPAGE 128 /* Don't call writepage() */
39 36
40#ifdef __KERNEL__ 37#ifdef __KERNEL__
41 38
@@ -166,6 +163,7 @@ struct nfs_inode {
166 struct radix_tree_root nfs_page_tree; 163 struct radix_tree_root nfs_page_tree;
167 164
168 unsigned long npages; 165 unsigned long npages;
166 unsigned long ncommit;
169 167
170 /* Open contexts for shared mmap writes */ 168 /* Open contexts for shared mmap writes */
171 struct list_head open_files; 169 struct list_head open_files;
@@ -349,7 +347,6 @@ extern int nfs_attribute_timeout(struct inode *inode);
349extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); 347extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
350extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); 348extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
351extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); 349extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
352extern int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping);
353extern int nfs_setattr(struct dentry *, struct iattr *); 350extern int nfs_setattr(struct dentry *, struct iattr *);
354extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); 351extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
355extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); 352extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
@@ -477,21 +474,12 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
477 * Try to write back everything synchronously (but check the 474 * Try to write back everything synchronously (but check the
478 * return value!) 475 * return value!)
479 */ 476 */
480extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_control *, int);
481extern int nfs_wb_all(struct inode *inode); 477extern int nfs_wb_all(struct inode *inode);
482extern int nfs_wb_nocommit(struct inode *inode);
483extern int nfs_wb_page(struct inode *inode, struct page* page); 478extern int nfs_wb_page(struct inode *inode, struct page* page);
484extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); 479extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
485#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 480#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
486extern int nfs_commit_inode(struct inode *, int);
487extern struct nfs_write_data *nfs_commitdata_alloc(void); 481extern struct nfs_write_data *nfs_commitdata_alloc(void);
488extern void nfs_commit_free(struct nfs_write_data *wdata); 482extern void nfs_commit_free(struct nfs_write_data *wdata);
489#else
490static inline int
491nfs_commit_inode(struct inode *inode, int how)
492{
493 return 0;
494}
495#endif 483#endif
496 484
497static inline int 485static inline int
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 6a2e44fd75e2..717a5e54eb1d 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -193,6 +193,8 @@ struct nfs4_slot_table {
193 int max_slots; /* # slots in table */ 193 int max_slots; /* # slots in table */
194 int highest_used_slotid; /* sent to server on each SEQ. 194 int highest_used_slotid; /* sent to server on each SEQ.
195 * op for dynamic resizing */ 195 * op for dynamic resizing */
196 int target_max_slots; /* Set by CB_RECALL_SLOT as
197 * the new max_slots */
196}; 198};
197 199
198static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) 200static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp)
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h
index 6508f0dc0eff..d7152b451e21 100644
--- a/include/linux/sunrpc/bc_xprt.h
+++ b/include/linux/sunrpc/bc_xprt.h
@@ -38,12 +38,27 @@ int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
38void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); 38void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs);
39void bc_release_request(struct rpc_task *); 39void bc_release_request(struct rpc_task *);
40int bc_send(struct rpc_rqst *req); 40int bc_send(struct rpc_rqst *req);
41
42/*
43 * Determine if a shared backchannel is in use
44 */
45static inline int svc_is_backchannel(const struct svc_rqst *rqstp)
46{
47 if (rqstp->rq_server->bc_xprt)
48 return 1;
49 return 0;
50}
41#else /* CONFIG_NFS_V4_1 */ 51#else /* CONFIG_NFS_V4_1 */
42static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, 52static inline int xprt_setup_backchannel(struct rpc_xprt *xprt,
43 unsigned int min_reqs) 53 unsigned int min_reqs)
44{ 54{
45 return 0; 55 return 0;
46} 56}
57
58static inline int svc_is_backchannel(const struct svc_rqst *rqstp)
59{
60 return 0;
61}
47#endif /* CONFIG_NFS_V4_1 */ 62#endif /* CONFIG_NFS_V4_1 */
48#endif /* _LINUX_SUNRPC_BC_XPRT_H */ 63#endif /* _LINUX_SUNRPC_BC_XPRT_H */
49 64