1 #ifndef _LINUX_NFS_FS_H
2 #define _LINUX_NFS_FS_H
3
4
5
6
7
8
9
10
11
12 #include <linux/nfs.h>
13
14 #include <linux/in.h>
15 #include <linux/nfs_mount.h>
16
17
18
19
20
21
22
23 #define NFS_READDIR_CACHE_SIZE 64
24
25 #define NFS_MAX_FILE_IO_BUFFER_SIZE 16384
26 #define NFS_DEF_FILE_IO_BUFFER_SIZE 1024
27
28
29
30
31
32
33 #define NFS_MAX_RPC_TIMEOUT 600
34
35
36
37
38
39
40
41 #define NFS_LOOKUP_CACHE_SIZE 64
42
43 #define NFS_SUPER_MAGIC 0x6969
44
45 #define NFS_SERVER(inode) (&(inode)->i_sb->u.nfs_sb.s_server)
46 #define NFS_FH(inode) (&(inode)->u.nfs_i.fhandle)
47
48 #ifdef __KERNEL__
49
50
51
52 extern int nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
53 struct nfs_fattr *fattr);
54 extern int nfs_proc_setattr(struct nfs_server *server, struct nfs_fh *fhandle,
55 struct nfs_sattr *sattr, struct nfs_fattr *fattr);
56 extern int nfs_proc_lookup(struct nfs_server *server, struct nfs_fh *dir,
57 const char *name, struct nfs_fh *fhandle,
58 struct nfs_fattr *fattr);
59 extern int nfs_proc_readlink(struct nfs_server *server, struct nfs_fh *fhandle,
60 int **p0, char **string, unsigned int *len,
61 unsigned int maxlen);
62 extern int nfs_proc_read(struct nfs_server *server, struct nfs_fh *fhandle,
63 int offset, int count, char *data,
64 struct nfs_fattr *fattr, int fs);
65 extern int nfs_proc_write(struct nfs_server *server, struct nfs_fh *fhandle,
66 int offset, int count, char *data,
67 struct nfs_fattr *fattr);
68 extern int nfs_proc_create(struct nfs_server *server, struct nfs_fh *dir,
69 const char *name, struct nfs_sattr *sattr,
70 struct nfs_fh *fhandle, struct nfs_fattr *fattr);
71 extern int nfs_proc_remove(struct nfs_server *server, struct nfs_fh *dir,
72 const char *name);
73 extern int nfs_proc_rename(struct nfs_server *server,
74 struct nfs_fh *old_dir, const char *old_name,
75 struct nfs_fh *new_dir, const char *new_name);
76 extern int nfs_proc_link(struct nfs_server *server, struct nfs_fh *fhandle,
77 struct nfs_fh *dir, const char *name);
78 extern int nfs_proc_symlink(struct nfs_server *server, struct nfs_fh *dir,
79 const char *name, const char *path, struct nfs_sattr *sattr);
80 extern int nfs_proc_mkdir(struct nfs_server *server, struct nfs_fh *dir,
81 const char *name, struct nfs_sattr *sattr,
82 struct nfs_fh *fhandle, struct nfs_fattr *fattr);
83 extern int nfs_proc_rmdir(struct nfs_server *server, struct nfs_fh *dir,
84 const char *name);
85 extern int nfs_proc_readdir(struct nfs_server *server, struct nfs_fh *fhandle,
86 int cookie, int count, struct nfs_entry *entry);
87 extern int nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
88 struct nfs_fsinfo *res);
89
90
91
92 extern int nfs_rpc_call(struct nfs_server *server, int *start, int *end, int size);
93
94
95
96 extern struct super_block *nfs_read_super(struct super_block *sb,
97 void *data,int);
98 extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
99 struct nfs_fattr *fattr);
100 extern void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr);
101
102
103
104 extern struct inode_operations nfs_file_inode_operations;
105
106
107
108 extern struct inode_operations nfs_dir_inode_operations;
109
110
111
112 extern struct inode_operations nfs_symlink_inode_operations;
113
114
115
116 extern int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma);
117
118 #endif
119
120 #endif