Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _LINUX_NFS_XDR_H |
| 2 | #define _LINUX_NFS_XDR_H |
| 3 | |
Andreas Gruenbacher | b7fa055 | 2005-06-22 17:16:27 +0000 | [diff] [blame] | 4 | #include <linux/nfsacl.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | |
Chuck Lever | 40859d7 | 2005-11-30 18:09:02 -0500 | [diff] [blame] | 6 | /* |
| 7 | * To change the maximum rsize and wsize supported by the NFS client, adjust |
| 8 | * NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can |
| 9 | * support a megabyte or more. The default is left at 4096 bytes, which is |
| 10 | * reasonable for NFS over UDP. |
| 11 | */ |
| 12 | #define NFS_MAX_FILE_IO_SIZE (1048576U) |
| 13 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
| 14 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
| 15 | |
Trond Myklebust | 8b4bdcf | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 16 | struct nfs_fsid { |
| 17 | uint64_t major; |
| 18 | uint64_t minor; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | }; |
| 20 | |
Trond Myklebust | 8b4bdcf | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 21 | /* |
| 22 | * Helper for checking equality between 2 fsids. |
| 23 | */ |
| 24 | static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b) |
| 25 | { |
| 26 | return a->major == b->major && a->minor == b->minor; |
| 27 | } |
| 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | struct nfs_fattr { |
| 30 | unsigned short valid; /* which fields are valid */ |
| 31 | __u64 pre_size; /* pre_op_attr.size */ |
| 32 | struct timespec pre_mtime; /* pre_op_attr.mtime */ |
| 33 | struct timespec pre_ctime; /* pre_op_attr.ctime */ |
| 34 | enum nfs_ftype type; /* always use NFSv2 types */ |
| 35 | __u32 mode; |
| 36 | __u32 nlink; |
| 37 | __u32 uid; |
| 38 | __u32 gid; |
| 39 | __u64 size; |
| 40 | union { |
| 41 | struct { |
| 42 | __u32 blocksize; |
| 43 | __u32 blocks; |
| 44 | } nfs2; |
| 45 | struct { |
| 46 | __u64 used; |
| 47 | } nfs3; |
| 48 | } du; |
| 49 | dev_t rdev; |
Trond Myklebust | 8b4bdcf | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 50 | struct nfs_fsid fsid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | __u64 fileid; |
| 52 | struct timespec atime; |
| 53 | struct timespec mtime; |
| 54 | struct timespec ctime; |
| 55 | __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */ |
| 56 | __u64 change_attr; /* NFSv4 change attribute */ |
| 57 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ |
Trond Myklebust | 3380114 | 2005-10-27 22:12:39 -0400 | [diff] [blame] | 58 | unsigned long time_start; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ |
| 62 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ |
| 63 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ |
Trond Myklebust | 73a3d07 | 2006-05-25 01:40:47 -0400 | [diff] [blame] | 64 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ |
Trond Myklebust | 70ca885 | 2007-09-30 15:21:24 -0400 | [diff] [blame] | 65 | #define NFS_ATTR_WCC_V4 0x0010 /* pre-op change attribute */ |
| 66 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0020 /* NFSv4 referral */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | |
| 68 | /* |
| 69 | * Info on the file system |
| 70 | */ |
| 71 | struct nfs_fsinfo { |
| 72 | struct nfs_fattr *fattr; /* Post-op attributes */ |
| 73 | __u32 rtmax; /* max. read transfer size */ |
| 74 | __u32 rtpref; /* pref. read transfer size */ |
| 75 | __u32 rtmult; /* reads should be multiple of this */ |
| 76 | __u32 wtmax; /* max. write transfer size */ |
| 77 | __u32 wtpref; /* pref. write transfer size */ |
| 78 | __u32 wtmult; /* writes should be multiple of this */ |
| 79 | __u32 dtpref; /* pref. readdir transfer size */ |
| 80 | __u64 maxfilesize; |
| 81 | __u32 lease_time; /* in seconds */ |
| 82 | }; |
| 83 | |
| 84 | struct nfs_fsstat { |
| 85 | struct nfs_fattr *fattr; /* Post-op attributes */ |
| 86 | __u64 tbytes; /* total size in bytes */ |
| 87 | __u64 fbytes; /* # of free bytes */ |
| 88 | __u64 abytes; /* # of bytes available to user */ |
| 89 | __u64 tfiles; /* # of files */ |
| 90 | __u64 ffiles; /* # of free files */ |
| 91 | __u64 afiles; /* # of files available to user */ |
| 92 | }; |
| 93 | |
| 94 | struct nfs2_fsstat { |
| 95 | __u32 tsize; /* Server transfer size */ |
| 96 | __u32 bsize; /* Filesystem block size */ |
| 97 | __u32 blocks; /* No. of "bsize" blocks on filesystem */ |
| 98 | __u32 bfree; /* No. of free "bsize" blocks */ |
| 99 | __u32 bavail; /* No. of available "bsize" blocks */ |
| 100 | }; |
| 101 | |
| 102 | struct nfs_pathconf { |
| 103 | struct nfs_fattr *fattr; /* Post-op attributes */ |
| 104 | __u32 max_link; /* max # of hard links */ |
| 105 | __u32 max_namelen; /* max name length */ |
| 106 | }; |
| 107 | |
| 108 | struct nfs4_change_info { |
| 109 | u32 atomic; |
| 110 | u64 before; |
| 111 | u64 after; |
| 112 | }; |
| 113 | |
Trond Myklebust | cee54fc | 2005-10-18 14:20:12 -0700 | [diff] [blame] | 114 | struct nfs_seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | /* |
| 116 | * Arguments to the open call. |
| 117 | */ |
| 118 | struct nfs_openargs { |
| 119 | const struct nfs_fh * fh; |
Trond Myklebust | cee54fc | 2005-10-18 14:20:12 -0700 | [diff] [blame] | 120 | struct nfs_seqid * seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 121 | int open_flags; |
| 122 | __u64 clientid; |
Trond Myklebust | 9f958ab | 2007-07-02 13:58:33 -0400 | [diff] [blame] | 123 | __u64 id; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | union { |
| 125 | struct iattr * attrs; /* UNCHECKED, GUARDED */ |
| 126 | nfs4_verifier verifier; /* EXCLUSIVE */ |
| 127 | nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */ |
| 128 | int delegation_type; /* CLAIM_PREVIOUS */ |
| 129 | } u; |
| 130 | const struct qstr * name; |
| 131 | const struct nfs_server *server; /* Needed for ID mapping */ |
| 132 | const u32 * bitmask; |
| 133 | __u32 claim; |
| 134 | }; |
| 135 | |
| 136 | struct nfs_openres { |
| 137 | nfs4_stateid stateid; |
| 138 | struct nfs_fh fh; |
| 139 | struct nfs4_change_info cinfo; |
| 140 | __u32 rflags; |
| 141 | struct nfs_fattr * f_attr; |
Trond Myklebust | 56ae19f | 2005-10-27 22:12:40 -0400 | [diff] [blame] | 142 | struct nfs_fattr * dir_attr; |
Trond Myklebust | c1d5193 | 2008-04-07 13:20:54 -0400 | [diff] [blame] | 143 | struct nfs_seqid * seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | const struct nfs_server *server; |
| 145 | int delegation_type; |
| 146 | nfs4_stateid delegation; |
| 147 | __u32 do_recall; |
| 148 | __u64 maxsize; |
Jeff Layton | aa53ed5 | 2007-06-05 14:49:03 -0400 | [diff] [blame] | 149 | __u32 attrset[NFS4_BITMAP_SIZE]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | }; |
| 151 | |
| 152 | /* |
| 153 | * Arguments to the open_confirm call. |
| 154 | */ |
| 155 | struct nfs_open_confirmargs { |
| 156 | const struct nfs_fh * fh; |
Trond Myklebust | cdd4e68 | 2006-01-03 09:55:12 +0100 | [diff] [blame] | 157 | nfs4_stateid * stateid; |
Trond Myklebust | cee54fc | 2005-10-18 14:20:12 -0700 | [diff] [blame] | 158 | struct nfs_seqid * seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | }; |
| 160 | |
| 161 | struct nfs_open_confirmres { |
| 162 | nfs4_stateid stateid; |
Trond Myklebust | c1d5193 | 2008-04-07 13:20:54 -0400 | [diff] [blame] | 163 | struct nfs_seqid * seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | }; |
| 165 | |
| 166 | /* |
| 167 | * Arguments to the close call. |
| 168 | */ |
| 169 | struct nfs_closeargs { |
| 170 | struct nfs_fh * fh; |
Trond Myklebust | 9512135 | 2005-10-18 14:20:12 -0700 | [diff] [blame] | 171 | nfs4_stateid * stateid; |
Trond Myklebust | cee54fc | 2005-10-18 14:20:12 -0700 | [diff] [blame] | 172 | struct nfs_seqid * seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | int open_flags; |
Trond Myklebust | 516a6af | 2005-10-27 22:12:41 -0400 | [diff] [blame] | 174 | const u32 * bitmask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | }; |
| 176 | |
| 177 | struct nfs_closeres { |
| 178 | nfs4_stateid stateid; |
Trond Myklebust | 516a6af | 2005-10-27 22:12:41 -0400 | [diff] [blame] | 179 | struct nfs_fattr * fattr; |
Trond Myklebust | c1d5193 | 2008-04-07 13:20:54 -0400 | [diff] [blame] | 180 | struct nfs_seqid * seqid; |
Trond Myklebust | 516a6af | 2005-10-27 22:12:41 -0400 | [diff] [blame] | 181 | const struct nfs_server *server; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 182 | }; |
| 183 | /* |
| 184 | * * Arguments to the lock,lockt, and locku call. |
| 185 | * */ |
| 186 | struct nfs_lowner { |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 187 | __u64 clientid; |
Trond Myklebust | 9f958ab | 2007-07-02 13:58:33 -0400 | [diff] [blame] | 188 | __u64 id; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | }; |
| 190 | |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 191 | struct nfs_lock_args { |
| 192 | struct nfs_fh * fh; |
| 193 | struct file_lock * fl; |
Trond Myklebust | 06735b3 | 2005-10-18 14:20:15 -0700 | [diff] [blame] | 194 | struct nfs_seqid * lock_seqid; |
| 195 | nfs4_stateid * lock_stateid; |
| 196 | struct nfs_seqid * open_seqid; |
| 197 | nfs4_stateid * open_stateid; |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 198 | struct nfs_lowner lock_owner; |
| 199 | unsigned char block : 1; |
| 200 | unsigned char reclaim : 1; |
| 201 | unsigned char new_lock_owner : 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | }; |
| 203 | |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 204 | struct nfs_lock_res { |
Trond Myklebust | c1d5193 | 2008-04-07 13:20:54 -0400 | [diff] [blame] | 205 | nfs4_stateid stateid; |
| 206 | struct nfs_seqid * lock_seqid; |
| 207 | struct nfs_seqid * open_seqid; |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 208 | }; |
| 209 | |
| 210 | struct nfs_locku_args { |
| 211 | struct nfs_fh * fh; |
| 212 | struct file_lock * fl; |
Trond Myklebust | cee54fc | 2005-10-18 14:20:12 -0700 | [diff] [blame] | 213 | struct nfs_seqid * seqid; |
Trond Myklebust | faf5f49 | 2005-10-18 14:20:15 -0700 | [diff] [blame] | 214 | nfs4_stateid * stateid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | }; |
| 216 | |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 217 | struct nfs_locku_res { |
Trond Myklebust | c1d5193 | 2008-04-07 13:20:54 -0400 | [diff] [blame] | 218 | nfs4_stateid stateid; |
| 219 | struct nfs_seqid * seqid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | }; |
| 221 | |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 222 | struct nfs_lockt_args { |
| 223 | struct nfs_fh * fh; |
| 224 | struct file_lock * fl; |
| 225 | struct nfs_lowner lock_owner; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | }; |
| 227 | |
Trond Myklebust | 911d1aa | 2006-01-03 09:55:16 +0100 | [diff] [blame] | 228 | struct nfs_lockt_res { |
| 229 | struct file_lock * denied; /* LOCK, LOCKT failed */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | }; |
| 231 | |
| 232 | struct nfs4_delegreturnargs { |
| 233 | const struct nfs_fh *fhandle; |
| 234 | const nfs4_stateid *stateid; |
Trond Myklebust | fa178f2 | 2006-01-03 09:55:38 +0100 | [diff] [blame] | 235 | const u32 * bitmask; |
| 236 | }; |
| 237 | |
| 238 | struct nfs4_delegreturnres { |
| 239 | struct nfs_fattr * fattr; |
| 240 | const struct nfs_server *server; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | }; |
| 242 | |
| 243 | /* |
| 244 | * Arguments to the read call. |
| 245 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | struct nfs_readargs { |
| 247 | struct nfs_fh * fh; |
| 248 | struct nfs_open_context *context; |
| 249 | __u64 offset; |
| 250 | __u32 count; |
| 251 | unsigned int pgbase; |
| 252 | struct page ** pages; |
| 253 | }; |
| 254 | |
| 255 | struct nfs_readres { |
| 256 | struct nfs_fattr * fattr; |
| 257 | __u32 count; |
| 258 | int eof; |
| 259 | }; |
| 260 | |
| 261 | /* |
| 262 | * Arguments to the write call. |
| 263 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 264 | struct nfs_writeargs { |
| 265 | struct nfs_fh * fh; |
| 266 | struct nfs_open_context *context; |
| 267 | __u64 offset; |
| 268 | __u32 count; |
| 269 | enum nfs3_stable_how stable; |
| 270 | unsigned int pgbase; |
| 271 | struct page ** pages; |
Trond Myklebust | 4f9838c | 2005-10-27 22:12:44 -0400 | [diff] [blame] | 272 | const u32 * bitmask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 273 | }; |
| 274 | |
| 275 | struct nfs_writeverf { |
| 276 | enum nfs3_stable_how committed; |
Al Viro | bc4785c | 2006-10-19 23:28:51 -0700 | [diff] [blame] | 277 | __be32 verifier[2]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | }; |
| 279 | |
| 280 | struct nfs_writeres { |
| 281 | struct nfs_fattr * fattr; |
| 282 | struct nfs_writeverf * verf; |
| 283 | __u32 count; |
Trond Myklebust | 4f9838c | 2005-10-27 22:12:44 -0400 | [diff] [blame] | 284 | const struct nfs_server *server; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | }; |
| 286 | |
| 287 | /* |
Trond Myklebust | 4fdc17b | 2007-07-14 15:39:57 -0400 | [diff] [blame] | 288 | * Common arguments to the unlink call |
| 289 | */ |
| 290 | struct nfs_removeargs { |
| 291 | const struct nfs_fh *fh; |
| 292 | struct qstr name; |
| 293 | const u32 * bitmask; |
| 294 | }; |
| 295 | |
| 296 | struct nfs_removeres { |
| 297 | const struct nfs_server *server; |
| 298 | struct nfs4_change_info cinfo; |
| 299 | struct nfs_fattr dir_attr; |
| 300 | }; |
| 301 | |
| 302 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | * Argument struct for decode_entry function |
| 304 | */ |
| 305 | struct nfs_entry { |
| 306 | __u64 ino; |
| 307 | __u64 cookie, |
| 308 | prev_cookie; |
| 309 | const char * name; |
| 310 | unsigned int len; |
| 311 | int eof; |
| 312 | struct nfs_fh * fh; |
| 313 | struct nfs_fattr * fattr; |
| 314 | }; |
| 315 | |
| 316 | /* |
| 317 | * The following types are for NFSv2 only. |
| 318 | */ |
| 319 | struct nfs_sattrargs { |
| 320 | struct nfs_fh * fh; |
| 321 | struct iattr * sattr; |
| 322 | }; |
| 323 | |
| 324 | struct nfs_diropargs { |
| 325 | struct nfs_fh * fh; |
| 326 | const char * name; |
| 327 | unsigned int len; |
| 328 | }; |
| 329 | |
| 330 | struct nfs_createargs { |
| 331 | struct nfs_fh * fh; |
| 332 | const char * name; |
| 333 | unsigned int len; |
| 334 | struct iattr * sattr; |
| 335 | }; |
| 336 | |
| 337 | struct nfs_renameargs { |
| 338 | struct nfs_fh * fromfh; |
| 339 | const char * fromname; |
| 340 | unsigned int fromlen; |
| 341 | struct nfs_fh * tofh; |
| 342 | const char * toname; |
| 343 | unsigned int tolen; |
| 344 | }; |
| 345 | |
| 346 | struct nfs_setattrargs { |
| 347 | struct nfs_fh * fh; |
| 348 | nfs4_stateid stateid; |
| 349 | struct iattr * iap; |
| 350 | const struct nfs_server * server; /* Needed for name mapping */ |
| 351 | const u32 * bitmask; |
| 352 | }; |
| 353 | |
J. Bruce Fields | 23ec696 | 2005-06-22 17:16:22 +0000 | [diff] [blame] | 354 | struct nfs_setaclargs { |
| 355 | struct nfs_fh * fh; |
| 356 | size_t acl_len; |
| 357 | unsigned int acl_pgbase; |
| 358 | struct page ** acl_pages; |
| 359 | }; |
| 360 | |
J. Bruce Fields | 029d105 | 2005-06-22 17:16:22 +0000 | [diff] [blame] | 361 | struct nfs_getaclargs { |
| 362 | struct nfs_fh * fh; |
| 363 | size_t acl_len; |
| 364 | unsigned int acl_pgbase; |
| 365 | struct page ** acl_pages; |
| 366 | }; |
| 367 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 368 | struct nfs_setattrres { |
| 369 | struct nfs_fattr * fattr; |
| 370 | const struct nfs_server * server; |
| 371 | }; |
| 372 | |
| 373 | struct nfs_linkargs { |
| 374 | struct nfs_fh * fromfh; |
| 375 | struct nfs_fh * tofh; |
| 376 | const char * toname; |
| 377 | unsigned int tolen; |
| 378 | }; |
| 379 | |
| 380 | struct nfs_symlinkargs { |
| 381 | struct nfs_fh * fromfh; |
| 382 | const char * fromname; |
| 383 | unsigned int fromlen; |
Chuck Lever | 94a6d75 | 2006-08-22 20:06:23 -0400 | [diff] [blame] | 384 | struct page ** pages; |
| 385 | unsigned int pathlen; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 386 | struct iattr * sattr; |
| 387 | }; |
| 388 | |
| 389 | struct nfs_readdirargs { |
| 390 | struct nfs_fh * fh; |
| 391 | __u32 cookie; |
| 392 | unsigned int count; |
| 393 | struct page ** pages; |
| 394 | }; |
| 395 | |
Andreas Gruenbacher | b7fa055 | 2005-06-22 17:16:27 +0000 | [diff] [blame] | 396 | struct nfs3_getaclargs { |
| 397 | struct nfs_fh * fh; |
| 398 | int mask; |
| 399 | struct page ** pages; |
| 400 | }; |
| 401 | |
| 402 | struct nfs3_setaclargs { |
| 403 | struct inode * inode; |
| 404 | int mask; |
| 405 | struct posix_acl * acl_access; |
| 406 | struct posix_acl * acl_default; |
| 407 | struct page ** pages; |
| 408 | }; |
| 409 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 410 | struct nfs_diropok { |
| 411 | struct nfs_fh * fh; |
| 412 | struct nfs_fattr * fattr; |
| 413 | }; |
| 414 | |
| 415 | struct nfs_readlinkargs { |
| 416 | struct nfs_fh * fh; |
| 417 | unsigned int pgbase; |
| 418 | unsigned int pglen; |
| 419 | struct page ** pages; |
| 420 | }; |
| 421 | |
| 422 | struct nfs3_sattrargs { |
| 423 | struct nfs_fh * fh; |
| 424 | struct iattr * sattr; |
| 425 | unsigned int guard; |
| 426 | struct timespec guardtime; |
| 427 | }; |
| 428 | |
| 429 | struct nfs3_diropargs { |
| 430 | struct nfs_fh * fh; |
| 431 | const char * name; |
| 432 | unsigned int len; |
| 433 | }; |
| 434 | |
| 435 | struct nfs3_accessargs { |
| 436 | struct nfs_fh * fh; |
| 437 | __u32 access; |
| 438 | }; |
| 439 | |
| 440 | struct nfs3_createargs { |
| 441 | struct nfs_fh * fh; |
| 442 | const char * name; |
| 443 | unsigned int len; |
| 444 | struct iattr * sattr; |
| 445 | enum nfs3_createmode createmode; |
Al Viro | bc4785c | 2006-10-19 23:28:51 -0700 | [diff] [blame] | 446 | __be32 verifier[2]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 447 | }; |
| 448 | |
| 449 | struct nfs3_mkdirargs { |
| 450 | struct nfs_fh * fh; |
| 451 | const char * name; |
| 452 | unsigned int len; |
| 453 | struct iattr * sattr; |
| 454 | }; |
| 455 | |
| 456 | struct nfs3_symlinkargs { |
| 457 | struct nfs_fh * fromfh; |
| 458 | const char * fromname; |
| 459 | unsigned int fromlen; |
Chuck Lever | 94a6d75 | 2006-08-22 20:06:23 -0400 | [diff] [blame] | 460 | struct page ** pages; |
| 461 | unsigned int pathlen; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 462 | struct iattr * sattr; |
| 463 | }; |
| 464 | |
| 465 | struct nfs3_mknodargs { |
| 466 | struct nfs_fh * fh; |
| 467 | const char * name; |
| 468 | unsigned int len; |
| 469 | enum nfs3_ftype type; |
| 470 | struct iattr * sattr; |
| 471 | dev_t rdev; |
| 472 | }; |
| 473 | |
| 474 | struct nfs3_renameargs { |
| 475 | struct nfs_fh * fromfh; |
| 476 | const char * fromname; |
| 477 | unsigned int fromlen; |
| 478 | struct nfs_fh * tofh; |
| 479 | const char * toname; |
| 480 | unsigned int tolen; |
| 481 | }; |
| 482 | |
| 483 | struct nfs3_linkargs { |
| 484 | struct nfs_fh * fromfh; |
| 485 | struct nfs_fh * tofh; |
| 486 | const char * toname; |
| 487 | unsigned int tolen; |
| 488 | }; |
| 489 | |
| 490 | struct nfs3_readdirargs { |
| 491 | struct nfs_fh * fh; |
| 492 | __u64 cookie; |
Al Viro | bc4785c | 2006-10-19 23:28:51 -0700 | [diff] [blame] | 493 | __be32 verf[2]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 494 | int plus; |
| 495 | unsigned int count; |
| 496 | struct page ** pages; |
| 497 | }; |
| 498 | |
| 499 | struct nfs3_diropres { |
| 500 | struct nfs_fattr * dir_attr; |
| 501 | struct nfs_fh * fh; |
| 502 | struct nfs_fattr * fattr; |
| 503 | }; |
| 504 | |
| 505 | struct nfs3_accessres { |
| 506 | struct nfs_fattr * fattr; |
| 507 | __u32 access; |
| 508 | }; |
| 509 | |
| 510 | struct nfs3_readlinkargs { |
| 511 | struct nfs_fh * fh; |
| 512 | unsigned int pgbase; |
| 513 | unsigned int pglen; |
| 514 | struct page ** pages; |
| 515 | }; |
| 516 | |
| 517 | struct nfs3_renameres { |
| 518 | struct nfs_fattr * fromattr; |
| 519 | struct nfs_fattr * toattr; |
| 520 | }; |
| 521 | |
| 522 | struct nfs3_linkres { |
| 523 | struct nfs_fattr * dir_attr; |
| 524 | struct nfs_fattr * fattr; |
| 525 | }; |
| 526 | |
| 527 | struct nfs3_readdirres { |
| 528 | struct nfs_fattr * dir_attr; |
Al Viro | bc4785c | 2006-10-19 23:28:51 -0700 | [diff] [blame] | 529 | __be32 * verf; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 530 | int plus; |
| 531 | }; |
| 532 | |
Andreas Gruenbacher | b7fa055 | 2005-06-22 17:16:27 +0000 | [diff] [blame] | 533 | struct nfs3_getaclres { |
| 534 | struct nfs_fattr * fattr; |
| 535 | int mask; |
| 536 | unsigned int acl_access_count; |
| 537 | unsigned int acl_default_count; |
| 538 | struct posix_acl * acl_access; |
| 539 | struct posix_acl * acl_default; |
| 540 | }; |
| 541 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 542 | #ifdef CONFIG_NFS_V4 |
| 543 | |
| 544 | typedef u64 clientid4; |
| 545 | |
| 546 | struct nfs4_accessargs { |
| 547 | const struct nfs_fh * fh; |
Trond Myklebust | 76b3299 | 2007-08-10 17:45:11 -0400 | [diff] [blame] | 548 | const u32 * bitmask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 549 | u32 access; |
| 550 | }; |
| 551 | |
| 552 | struct nfs4_accessres { |
Trond Myklebust | 76b3299 | 2007-08-10 17:45:11 -0400 | [diff] [blame] | 553 | const struct nfs_server * server; |
| 554 | struct nfs_fattr * fattr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 555 | u32 supported; |
| 556 | u32 access; |
| 557 | }; |
| 558 | |
| 559 | struct nfs4_create_arg { |
| 560 | u32 ftype; |
| 561 | union { |
Chuck Lever | 94a6d75 | 2006-08-22 20:06:23 -0400 | [diff] [blame] | 562 | struct { |
| 563 | struct page ** pages; |
| 564 | unsigned int len; |
| 565 | } symlink; /* NF4LNK */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 566 | struct { |
| 567 | u32 specdata1; |
| 568 | u32 specdata2; |
| 569 | } device; /* NF4BLK, NF4CHR */ |
| 570 | } u; |
| 571 | const struct qstr * name; |
| 572 | const struct nfs_server * server; |
| 573 | const struct iattr * attrs; |
| 574 | const struct nfs_fh * dir_fh; |
| 575 | const u32 * bitmask; |
| 576 | }; |
| 577 | |
| 578 | struct nfs4_create_res { |
| 579 | const struct nfs_server * server; |
| 580 | struct nfs_fh * fh; |
| 581 | struct nfs_fattr * fattr; |
| 582 | struct nfs4_change_info dir_cinfo; |
Trond Myklebust | 56ae19f | 2005-10-27 22:12:40 -0400 | [diff] [blame] | 583 | struct nfs_fattr * dir_fattr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 584 | }; |
| 585 | |
| 586 | struct nfs4_fsinfo_arg { |
| 587 | const struct nfs_fh * fh; |
| 588 | const u32 * bitmask; |
| 589 | }; |
| 590 | |
| 591 | struct nfs4_getattr_arg { |
| 592 | const struct nfs_fh * fh; |
| 593 | const u32 * bitmask; |
| 594 | }; |
| 595 | |
| 596 | struct nfs4_getattr_res { |
| 597 | const struct nfs_server * server; |
| 598 | struct nfs_fattr * fattr; |
| 599 | }; |
| 600 | |
| 601 | struct nfs4_link_arg { |
| 602 | const struct nfs_fh * fh; |
| 603 | const struct nfs_fh * dir_fh; |
| 604 | const struct qstr * name; |
Trond Myklebust | 91ba2ee | 2005-10-27 22:12:42 -0400 | [diff] [blame] | 605 | const u32 * bitmask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 606 | }; |
| 607 | |
Trond Myklebust | 91ba2ee | 2005-10-27 22:12:42 -0400 | [diff] [blame] | 608 | struct nfs4_link_res { |
| 609 | const struct nfs_server * server; |
| 610 | struct nfs_fattr * fattr; |
| 611 | struct nfs4_change_info cinfo; |
| 612 | struct nfs_fattr * dir_attr; |
| 613 | }; |
| 614 | |
| 615 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 616 | struct nfs4_lookup_arg { |
| 617 | const struct nfs_fh * dir_fh; |
| 618 | const struct qstr * name; |
| 619 | const u32 * bitmask; |
| 620 | }; |
| 621 | |
| 622 | struct nfs4_lookup_res { |
| 623 | const struct nfs_server * server; |
| 624 | struct nfs_fattr * fattr; |
| 625 | struct nfs_fh * fh; |
| 626 | }; |
| 627 | |
| 628 | struct nfs4_lookup_root_arg { |
| 629 | const u32 * bitmask; |
| 630 | }; |
| 631 | |
| 632 | struct nfs4_pathconf_arg { |
| 633 | const struct nfs_fh * fh; |
| 634 | const u32 * bitmask; |
| 635 | }; |
| 636 | |
| 637 | struct nfs4_readdir_arg { |
| 638 | const struct nfs_fh * fh; |
| 639 | u64 cookie; |
| 640 | nfs4_verifier verifier; |
| 641 | u32 count; |
| 642 | struct page ** pages; /* zero-copy data */ |
| 643 | unsigned int pgbase; /* zero-copy data */ |
| 644 | const u32 * bitmask; |
| 645 | }; |
| 646 | |
| 647 | struct nfs4_readdir_res { |
| 648 | nfs4_verifier verifier; |
| 649 | unsigned int pgbase; |
| 650 | }; |
| 651 | |
| 652 | struct nfs4_readlink { |
| 653 | const struct nfs_fh * fh; |
| 654 | unsigned int pgbase; |
| 655 | unsigned int pglen; /* zero-copy data */ |
| 656 | struct page ** pages; /* zero-copy data */ |
| 657 | }; |
| 658 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | struct nfs4_rename_arg { |
| 660 | const struct nfs_fh * old_dir; |
| 661 | const struct nfs_fh * new_dir; |
| 662 | const struct qstr * old_name; |
| 663 | const struct qstr * new_name; |
Trond Myklebust | 6caf2c8 | 2005-10-27 22:12:43 -0400 | [diff] [blame] | 664 | const u32 * bitmask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 665 | }; |
| 666 | |
| 667 | struct nfs4_rename_res { |
Trond Myklebust | 6caf2c8 | 2005-10-27 22:12:43 -0400 | [diff] [blame] | 668 | const struct nfs_server * server; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 669 | struct nfs4_change_info old_cinfo; |
Trond Myklebust | 6caf2c8 | 2005-10-27 22:12:43 -0400 | [diff] [blame] | 670 | struct nfs_fattr * old_fattr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 671 | struct nfs4_change_info new_cinfo; |
Trond Myklebust | 6caf2c8 | 2005-10-27 22:12:43 -0400 | [diff] [blame] | 672 | struct nfs_fattr * new_fattr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 673 | }; |
| 674 | |
Trond Myklebust | 69dd716 | 2007-12-14 14:56:07 -0500 | [diff] [blame] | 675 | #define NFS4_SETCLIENTID_NAMELEN (56) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 676 | struct nfs4_setclientid { |
Chuck Lever | cc38bac | 2007-12-10 14:56:54 -0500 | [diff] [blame] | 677 | const nfs4_verifier * sc_verifier; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 678 | unsigned int sc_name_len; |
Chuck Lever | cc38bac | 2007-12-10 14:56:54 -0500 | [diff] [blame] | 679 | char sc_name[NFS4_SETCLIENTID_NAMELEN]; |
| 680 | u32 sc_prog; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 681 | unsigned int sc_netid_len; |
Chuck Lever | cc38bac | 2007-12-10 14:56:54 -0500 | [diff] [blame] | 682 | char sc_netid[RPCBIND_MAXNETIDLEN]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 683 | unsigned int sc_uaddr_len; |
Chuck Lever | cc38bac | 2007-12-10 14:56:54 -0500 | [diff] [blame] | 684 | char sc_uaddr[RPCBIND_MAXUADDRLEN]; |
| 685 | u32 sc_cb_ident; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 686 | }; |
| 687 | |
| 688 | struct nfs4_statfs_arg { |
| 689 | const struct nfs_fh * fh; |
| 690 | const u32 * bitmask; |
| 691 | }; |
| 692 | |
| 693 | struct nfs4_server_caps_res { |
| 694 | u32 attr_bitmask[2]; |
| 695 | u32 acl_bitmask; |
| 696 | u32 has_links; |
| 697 | u32 has_symlinks; |
| 698 | }; |
| 699 | |
Manoj Naik | 7aaa0b3 | 2006-06-09 09:34:23 -0400 | [diff] [blame] | 700 | struct nfs4_string { |
| 701 | unsigned int len; |
| 702 | char *data; |
Trond Myklebust | 683b57b | 2006-06-09 09:34:22 -0400 | [diff] [blame] | 703 | }; |
| 704 | |
Manoj Naik | 7aaa0b3 | 2006-06-09 09:34:23 -0400 | [diff] [blame] | 705 | #define NFS4_PATHNAME_MAXCOMPONENTS 512 |
| 706 | struct nfs4_pathname { |
| 707 | unsigned int ncomponents; |
| 708 | struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS]; |
| 709 | }; |
| 710 | |
| 711 | #define NFS4_FS_LOCATION_MAXSERVERS 10 |
| 712 | struct nfs4_fs_location { |
| 713 | unsigned int nservers; |
| 714 | struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS]; |
| 715 | struct nfs4_pathname rootpath; |
| 716 | }; |
| 717 | |
| 718 | #define NFS4_FS_LOCATIONS_MAXENTRIES 10 |
| 719 | struct nfs4_fs_locations { |
Trond Myklebust | 683b57b | 2006-06-09 09:34:22 -0400 | [diff] [blame] | 720 | struct nfs_fattr fattr; |
| 721 | const struct nfs_server *server; |
Manoj Naik | 7aaa0b3 | 2006-06-09 09:34:23 -0400 | [diff] [blame] | 722 | struct nfs4_pathname fs_path; |
Trond Myklebust | 683b57b | 2006-06-09 09:34:22 -0400 | [diff] [blame] | 723 | int nlocations; |
Manoj Naik | 7aaa0b3 | 2006-06-09 09:34:23 -0400 | [diff] [blame] | 724 | struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES]; |
Trond Myklebust | 683b57b | 2006-06-09 09:34:22 -0400 | [diff] [blame] | 725 | }; |
| 726 | |
| 727 | struct nfs4_fs_locations_arg { |
| 728 | const struct nfs_fh *dir_fh; |
| 729 | const struct qstr *name; |
| 730 | struct page *page; |
| 731 | const u32 *bitmask; |
| 732 | }; |
| 733 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 734 | #endif /* CONFIG_NFS_V4 */ |
| 735 | |
| 736 | struct nfs_page; |
| 737 | |
Chuck Lever | 40859d7 | 2005-11-30 18:09:02 -0500 | [diff] [blame] | 738 | #define NFS_PAGEVEC_SIZE (8U) |
| 739 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 740 | struct nfs_read_data { |
| 741 | int flags; |
| 742 | struct rpc_task task; |
| 743 | struct inode *inode; |
| 744 | struct rpc_cred *cred; |
| 745 | struct nfs_fattr fattr; /* fattr storage */ |
| 746 | struct list_head pages; /* Coalesced read requests */ |
| 747 | struct nfs_page *req; /* multi ops per nfs_page */ |
Chuck Lever | 40859d7 | 2005-11-30 18:09:02 -0500 | [diff] [blame] | 748 | struct page **pagevec; |
Trond Myklebust | e9f7bee | 2006-09-08 09:48:54 -0700 | [diff] [blame] | 749 | unsigned int npages; /* Max length of pagevec */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 750 | struct nfs_readargs args; |
| 751 | struct nfs_readres res; |
| 752 | #ifdef CONFIG_NFS_V4 |
| 753 | unsigned long timestamp; /* For lease renewal */ |
| 754 | #endif |
Chuck Lever | 0d0b5cb | 2006-05-25 01:40:53 -0400 | [diff] [blame] | 755 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 756 | }; |
| 757 | |
| 758 | struct nfs_write_data { |
| 759 | int flags; |
| 760 | struct rpc_task task; |
| 761 | struct inode *inode; |
| 762 | struct rpc_cred *cred; |
| 763 | struct nfs_fattr fattr; |
| 764 | struct nfs_writeverf verf; |
| 765 | struct list_head pages; /* Coalesced requests we wish to flush */ |
| 766 | struct nfs_page *req; /* multi ops per nfs_page */ |
Chuck Lever | 40859d7 | 2005-11-30 18:09:02 -0500 | [diff] [blame] | 767 | struct page **pagevec; |
Trond Myklebust | e9f7bee | 2006-09-08 09:48:54 -0700 | [diff] [blame] | 768 | unsigned int npages; /* Max length of pagevec */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 769 | struct nfs_writeargs args; /* argument struct */ |
| 770 | struct nfs_writeres res; /* result struct */ |
| 771 | #ifdef CONFIG_NFS_V4 |
| 772 | unsigned long timestamp; /* For lease renewal */ |
| 773 | #endif |
Chuck Lever | 0d0b5cb | 2006-05-25 01:40:53 -0400 | [diff] [blame] | 774 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 775 | }; |
| 776 | |
| 777 | struct nfs_access_entry; |
| 778 | |
| 779 | /* |
| 780 | * RPC procedure vector for NFSv2/NFSv3 demuxing |
| 781 | */ |
| 782 | struct nfs_rpc_ops { |
Chuck Lever | c0e07cb | 2008-01-14 12:32:05 -0500 | [diff] [blame] | 783 | u32 version; /* Protocol version */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 784 | struct dentry_operations *dentry_ops; |
Arjan van de Ven | c5ef1c4 | 2007-02-12 00:55:40 -0800 | [diff] [blame] | 785 | const struct inode_operations *dir_inode_ops; |
| 786 | const struct inode_operations *file_inode_ops; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 787 | |
| 788 | int (*getroot) (struct nfs_server *, struct nfs_fh *, |
| 789 | struct nfs_fsinfo *); |
David Howells | 2b3de44 | 2006-08-22 20:06:09 -0400 | [diff] [blame] | 790 | int (*lookupfh)(struct nfs_server *, struct nfs_fh *, |
| 791 | struct qstr *, struct nfs_fh *, |
| 792 | struct nfs_fattr *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 793 | int (*getattr) (struct nfs_server *, struct nfs_fh *, |
| 794 | struct nfs_fattr *); |
| 795 | int (*setattr) (struct dentry *, struct nfs_fattr *, |
| 796 | struct iattr *); |
| 797 | int (*lookup) (struct inode *, struct qstr *, |
| 798 | struct nfs_fh *, struct nfs_fattr *); |
| 799 | int (*access) (struct inode *, struct nfs_access_entry *); |
| 800 | int (*readlink)(struct inode *, struct page *, unsigned int, |
| 801 | unsigned int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 802 | int (*create) (struct inode *, struct dentry *, |
Trond Myklebust | 02a913a | 2005-10-18 14:20:17 -0700 | [diff] [blame] | 803 | struct iattr *, int, struct nameidata *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 804 | int (*remove) (struct inode *, struct qstr *); |
Trond Myklebust | e4eff1a | 2007-07-14 15:39:58 -0400 | [diff] [blame] | 805 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
| 806 | int (*unlink_done) (struct rpc_task *, struct inode *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 807 | int (*rename) (struct inode *, struct qstr *, |
| 808 | struct inode *, struct qstr *); |
| 809 | int (*link) (struct inode *, struct inode *, struct qstr *); |
Chuck Lever | 94a6d75 | 2006-08-22 20:06:23 -0400 | [diff] [blame] | 810 | int (*symlink) (struct inode *, struct dentry *, struct page *, |
| 811 | unsigned int, struct iattr *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 812 | int (*mkdir) (struct inode *, struct dentry *, struct iattr *); |
| 813 | int (*rmdir) (struct inode *, struct qstr *); |
| 814 | int (*readdir) (struct dentry *, struct rpc_cred *, |
| 815 | u64, struct page *, unsigned int, int); |
| 816 | int (*mknod) (struct inode *, struct dentry *, struct iattr *, |
| 817 | dev_t); |
| 818 | int (*statfs) (struct nfs_server *, struct nfs_fh *, |
| 819 | struct nfs_fsstat *); |
| 820 | int (*fsinfo) (struct nfs_server *, struct nfs_fh *, |
| 821 | struct nfs_fsinfo *); |
| 822 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, |
| 823 | struct nfs_pathconf *); |
David Howells | e9326dc | 2006-08-22 20:06:10 -0400 | [diff] [blame] | 824 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
Al Viro | 0dbb4c6 | 2006-10-19 23:28:49 -0700 | [diff] [blame] | 825 | __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus); |
Trond Myklebust | bdc7f02 | 2007-07-14 15:40:00 -0400 | [diff] [blame] | 826 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); |
Trond Myklebust | ec06c09 | 2006-03-20 13:44:27 -0500 | [diff] [blame] | 827 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); |
Trond Myklebust | bdc7f02 | 2007-07-14 15:40:00 -0400 | [diff] [blame] | 828 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); |
Trond Myklebust | 788e7a8 | 2006-03-20 13:44:27 -0500 | [diff] [blame] | 829 | int (*write_done) (struct rpc_task *, struct nfs_write_data *); |
Trond Myklebust | bdc7f02 | 2007-07-14 15:40:00 -0400 | [diff] [blame] | 830 | void (*commit_setup) (struct nfs_write_data *, struct rpc_message *); |
Trond Myklebust | 788e7a8 | 2006-03-20 13:44:27 -0500 | [diff] [blame] | 831 | int (*commit_done) (struct rpc_task *, struct nfs_write_data *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 832 | int (*lock)(struct file *, int, struct file_lock *); |
Trond Myklebust | 2116271 | 2008-05-20 19:34:39 -0400 | [diff] [blame] | 833 | int (*lock_check_bounds)(const struct file_lock *); |
Trond Myklebust | ada70d9 | 2005-06-22 17:16:22 +0000 | [diff] [blame] | 834 | void (*clear_acl_cache)(struct inode *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 835 | }; |
| 836 | |
| 837 | /* |
| 838 | * NFS_CALL(getattr, inode, (fattr)); |
| 839 | * into |
| 840 | * NFS_PROTO(inode)->getattr(fattr); |
| 841 | */ |
| 842 | #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args |
| 843 | |
| 844 | /* |
| 845 | * Function vectors etc. for the NFS client |
| 846 | */ |
David Howells | 509de81 | 2006-08-22 20:06:11 -0400 | [diff] [blame] | 847 | extern const struct nfs_rpc_ops nfs_v2_clientops; |
| 848 | extern const struct nfs_rpc_ops nfs_v3_clientops; |
| 849 | extern const struct nfs_rpc_ops nfs_v4_clientops; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 850 | extern struct rpc_version nfs_version2; |
| 851 | extern struct rpc_version nfs_version3; |
| 852 | extern struct rpc_version nfs_version4; |
| 853 | |
Andreas Gruenbacher | b7fa055 | 2005-06-22 17:16:27 +0000 | [diff] [blame] | 854 | extern struct rpc_version nfsacl_version3; |
| 855 | extern struct rpc_program nfsacl_program; |
| 856 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 857 | #endif |