patch-2.1.79 linux/include/linux/nfs_fs.h
Next file: linux/include/linux/nfs_fs_sb.h
Previous file: linux/include/linux/netlink.h
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Mon Jan 12 16:43:34 1998
- Orig file:
v2.1.78/linux/include/linux/nfs_fs.h
- Orig date:
Tue Jan 6 09:37:38 1998
diff -u --recursive --new-file v2.1.78/linux/include/linux/nfs_fs.h linux/include/linux/nfs_fs.h
@@ -13,7 +13,7 @@
#include <linux/sched.h>
#include <linux/in.h>
-#include <linux/sunrpc/debug.h>
+#include <linux/sunrpc/sched.h>
#include <linux/nfs.h>
#include <linux/nfs_mount.h>
@@ -78,8 +78,6 @@
#define NFS_FLAGS(inode) ((inode)->u.nfs_i.flags)
#define NFS_REVALIDATING(inode) (NFS_FLAGS(inode) & NFS_INO_REVALIDATE)
-
-#define NFS_RENAMED_DIR(inode) ((inode)->u.nfs_i.silly_inode)
#define NFS_WRITEBACK(inode) ((inode)->u.nfs_i.writeback)
/*
@@ -90,6 +88,46 @@
#ifdef __KERNEL__
/*
+ * This struct describes a file region to be written.
+ * It's kind of a pity we have to keep all these lists ourselves, rather
+ * than sticking an extra pointer into struct page.
+ */
+struct nfs_wreq {
+ struct rpc_listitem wb_list; /* linked list of req's */
+ struct rpc_task wb_task; /* RPC task */
+ struct dentry * wb_dentry; /* dentry referenced */
+ struct inode * wb_inode; /* inode referenced */
+ struct page * wb_page; /* page to be written */
+ unsigned int wb_offset; /* offset within page */
+ unsigned int wb_bytes; /* dirty range */
+ pid_t wb_pid; /* owner process */
+ unsigned short wb_flags; /* status flags */
+
+ struct nfs_writeargs * wb_args; /* NFS RPC stuff */
+ struct nfs_fattr * wb_fattr; /* file attributes */
+};
+#define wb_status wb_task.tk_status
+
+#define WB_NEXT(req) ((struct nfs_wreq *) ((req)->wb_list.next))
+
+/*
+ * Various flags for wb_flags
+ */
+#define NFS_WRITE_WANTLOCK 0x0001 /* needs to lock page */
+#define NFS_WRITE_LOCKED 0x0002 /* holds lock on page */
+#define NFS_WRITE_CANCELLED 0x0004 /* has been cancelled */
+#define NFS_WRITE_UNCOMMITTED 0x0008 /* written but uncommitted (NFSv3) */
+#define NFS_WRITE_INVALIDATE 0x0010 /* invalidate after write */
+#define NFS_WRITE_INPROGRESS 0x0020 /* RPC call in progress */
+
+#define WB_WANTLOCK(req) ((req)->wb_flags & NFS_WRITE_WANTLOCK)
+#define WB_HAVELOCK(req) ((req)->wb_flags & NFS_WRITE_LOCKED)
+#define WB_CANCELLED(req) ((req)->wb_flags & NFS_WRITE_CANCELLED)
+#define WB_UNCOMMITTED(req) ((req)->wb_flags & NFS_WRITE_UNCOMMITTED)
+#define WB_INVALIDATE(req) ((req)->wb_flags & NFS_WRITE_INVALIDATE)
+#define WB_INPROGRESS(req) ((req)->wb_flags & NFS_WRITE_INPROGRESS)
+
+/*
* linux/fs/nfs/proc.c
*/
extern int nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
@@ -171,6 +209,7 @@
* linux/fs/nfs/write.c
*/
extern int nfs_writepage(struct dentry *, struct page *);
+extern int nfs_find_dentry_request(struct inode *, struct dentry *);
extern int nfs_check_failed_request(struct inode *);
extern int nfs_check_error(struct inode *);
extern int nfs_flush_dirty_pages(struct inode *, pid_t, off_t, off_t);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov