summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChuck Lever <cel@citi.umich.edu>2002-10-06 19:35:13 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-06 19:35:13 -0700
commitc03e7607e0391b919d3f6ded8c98fdcddbcb20b1 (patch)
tree163876c9daa7ff5aa5b4f59136e7af47823850d9 /include/linux
parenteb582eba8825800488a47798e2b4b3f11a9533d9 (diff)
[PATCH] initial support for NFS direct I/O for 2.5
This adds initial support for NFS direct I/O in the 2.5 kernel. many have asked for this support to be included in 2.5. this patch does not provide working NFS direct I/O, but i'm sending what i have now so that it can be included before October 20. NFS direct I/O is enabled by its very own kernel config option. when enabled, the NFS client won't build to prevent people from using this and possibly corrupting their NFS files. later i will send a patch that finishes the implementation. [ Config option currently disabled ]
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_page.h2
-rw-r--r--include/linux/nfs_xdr.h22
2 files changed, 18 insertions, 6 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 9fc362b75850..029818ff0870 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -48,6 +48,7 @@ extern struct nfs_page *nfs_create_request(struct rpc_cred *, struct inode *,
unsigned int, unsigned int);
extern void nfs_clear_request(struct nfs_page *req);
extern void nfs_release_request(struct nfs_page *req);
+extern void nfs_release_list(struct list_head *list);
extern void nfs_list_add_request(struct nfs_page *, struct list_head *);
@@ -59,6 +60,7 @@ extern int nfs_scan_list(struct list_head *, struct list_head *,
extern int nfs_coalesce_requests(struct list_head *, struct list_head *,
unsigned int);
extern int nfs_wait_on_request(struct nfs_page *);
+extern int nfs_wait_for_reads(struct list_head *);
extern spinlock_t nfs_wreq_lock;
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index c68916571e71..8d9c04899d65 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_NFS_XDR_H
#define _LINUX_NFS_XDR_H
+#include <linux/sunrpc/xprt.h>
+
struct nfs_fattr {
unsigned short valid; /* which fields are valid */
__u64 pre_size; /* pre_op_attr.size */
@@ -57,10 +59,14 @@ struct nfs_fsinfo {
__u32 namelen;/* max name length */
};
-/* Arguments to the read call.
- * Note that NFS_READ_MAXIOV must be <= (MAX_IOVEC-2) from sunrpc/xprt.h
+/*
+ * Arguments to the read call.
*/
-#define NFS_READ_MAXIOV 8
+
+#define NFS_READ_MAXIOV (9U)
+#if (NFS_READ_MAXIOV > (MAX_IOVEC -2))
+#error "NFS_READ_MAXIOV is too large"
+#endif
struct nfs_readargs {
struct nfs_fh * fh;
@@ -76,10 +82,14 @@ struct nfs_readres {
int eof;
};
-/* Arguments to the write call.
- * Note that NFS_WRITE_MAXIOV must be <= (MAX_IOVEC-2) from sunrpc/xprt.h
+/*
+ * Arguments to the write call.
*/
-#define NFS_WRITE_MAXIOV 8
+#define NFS_WRITE_MAXIOV (9U)
+#if (NFS_WRITE_MAXIOV > (MAX_IOVEC -2))
+#error "NFS_WRITE_MAXIOV is too large"
+#endif
+
struct nfs_writeargs {
struct nfs_fh * fh;
__u64 offset;