Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 95984f62c9b0bf6d89ef4f514b1afe73623481de 858 lines 20 kB view raw
1#ifndef _LINUX_NFS_XDR_H 2#define _LINUX_NFS_XDR_H 3 4#include <linux/nfsacl.h> 5 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 16struct nfs_fsid { 17 uint64_t major; 18 uint64_t minor; 19}; 20 21/* 22 * Helper for checking equality between 2 fsids. 23 */ 24static 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 29struct 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; 50 struct nfs_fsid fsid; 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 */ 58 unsigned long time_start; 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 */ 64#define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ 65#define NFS_ATTR_WCC_V4 0x0010 /* pre-op change attribute */ 66#define NFS_ATTR_FATTR_V4_REFERRAL 0x0020 /* NFSv4 referral */ 67 68/* 69 * Info on the file system 70 */ 71struct 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 84struct 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 94struct 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 102struct 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 108struct nfs4_change_info { 109 u32 atomic; 110 u64 before; 111 u64 after; 112}; 113 114struct nfs_seqid; 115/* 116 * Arguments to the open call. 117 */ 118struct nfs_openargs { 119 const struct nfs_fh * fh; 120 struct nfs_seqid * seqid; 121 int open_flags; 122 __u64 clientid; 123 __u64 id; 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 136struct 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; 142 struct nfs_fattr * dir_attr; 143 struct nfs_seqid * seqid; 144 const struct nfs_server *server; 145 int delegation_type; 146 nfs4_stateid delegation; 147 __u32 do_recall; 148 __u64 maxsize; 149 __u32 attrset[NFS4_BITMAP_SIZE]; 150}; 151 152/* 153 * Arguments to the open_confirm call. 154 */ 155struct nfs_open_confirmargs { 156 const struct nfs_fh * fh; 157 nfs4_stateid * stateid; 158 struct nfs_seqid * seqid; 159}; 160 161struct nfs_open_confirmres { 162 nfs4_stateid stateid; 163 struct nfs_seqid * seqid; 164}; 165 166/* 167 * Arguments to the close call. 168 */ 169struct nfs_closeargs { 170 struct nfs_fh * fh; 171 nfs4_stateid * stateid; 172 struct nfs_seqid * seqid; 173 int open_flags; 174 const u32 * bitmask; 175}; 176 177struct nfs_closeres { 178 nfs4_stateid stateid; 179 struct nfs_fattr * fattr; 180 struct nfs_seqid * seqid; 181 const struct nfs_server *server; 182}; 183/* 184 * * Arguments to the lock,lockt, and locku call. 185 * */ 186struct nfs_lowner { 187 __u64 clientid; 188 __u64 id; 189}; 190 191struct nfs_lock_args { 192 struct nfs_fh * fh; 193 struct file_lock * fl; 194 struct nfs_seqid * lock_seqid; 195 nfs4_stateid * lock_stateid; 196 struct nfs_seqid * open_seqid; 197 nfs4_stateid * open_stateid; 198 struct nfs_lowner lock_owner; 199 unsigned char block : 1; 200 unsigned char reclaim : 1; 201 unsigned char new_lock_owner : 1; 202}; 203 204struct nfs_lock_res { 205 nfs4_stateid stateid; 206 struct nfs_seqid * lock_seqid; 207 struct nfs_seqid * open_seqid; 208}; 209 210struct nfs_locku_args { 211 struct nfs_fh * fh; 212 struct file_lock * fl; 213 struct nfs_seqid * seqid; 214 nfs4_stateid * stateid; 215}; 216 217struct nfs_locku_res { 218 nfs4_stateid stateid; 219 struct nfs_seqid * seqid; 220}; 221 222struct nfs_lockt_args { 223 struct nfs_fh * fh; 224 struct file_lock * fl; 225 struct nfs_lowner lock_owner; 226}; 227 228struct nfs_lockt_res { 229 struct file_lock * denied; /* LOCK, LOCKT failed */ 230}; 231 232struct nfs4_delegreturnargs { 233 const struct nfs_fh *fhandle; 234 const nfs4_stateid *stateid; 235 const u32 * bitmask; 236}; 237 238struct nfs4_delegreturnres { 239 struct nfs_fattr * fattr; 240 const struct nfs_server *server; 241}; 242 243/* 244 * Arguments to the read call. 245 */ 246struct 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 255struct nfs_readres { 256 struct nfs_fattr * fattr; 257 __u32 count; 258 int eof; 259}; 260 261/* 262 * Arguments to the write call. 263 */ 264struct 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; 272 const u32 * bitmask; 273}; 274 275struct nfs_writeverf { 276 enum nfs3_stable_how committed; 277 __be32 verifier[2]; 278}; 279 280struct nfs_writeres { 281 struct nfs_fattr * fattr; 282 struct nfs_writeverf * verf; 283 __u32 count; 284 const struct nfs_server *server; 285}; 286 287/* 288 * Common arguments to the unlink call 289 */ 290struct nfs_removeargs { 291 const struct nfs_fh *fh; 292 struct qstr name; 293 const u32 * bitmask; 294}; 295 296struct nfs_removeres { 297 const struct nfs_server *server; 298 struct nfs4_change_info cinfo; 299 struct nfs_fattr dir_attr; 300}; 301 302/* 303 * Argument struct for decode_entry function 304 */ 305struct 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 */ 319struct nfs_sattrargs { 320 struct nfs_fh * fh; 321 struct iattr * sattr; 322}; 323 324struct nfs_diropargs { 325 struct nfs_fh * fh; 326 const char * name; 327 unsigned int len; 328}; 329 330struct nfs_createargs { 331 struct nfs_fh * fh; 332 const char * name; 333 unsigned int len; 334 struct iattr * sattr; 335}; 336 337struct 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 346struct 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 354struct nfs_setaclargs { 355 struct nfs_fh * fh; 356 size_t acl_len; 357 unsigned int acl_pgbase; 358 struct page ** acl_pages; 359}; 360 361struct nfs_getaclargs { 362 struct nfs_fh * fh; 363 size_t acl_len; 364 unsigned int acl_pgbase; 365 struct page ** acl_pages; 366}; 367 368struct nfs_setattrres { 369 struct nfs_fattr * fattr; 370 const struct nfs_server * server; 371}; 372 373struct nfs_linkargs { 374 struct nfs_fh * fromfh; 375 struct nfs_fh * tofh; 376 const char * toname; 377 unsigned int tolen; 378}; 379 380struct nfs_symlinkargs { 381 struct nfs_fh * fromfh; 382 const char * fromname; 383 unsigned int fromlen; 384 struct page ** pages; 385 unsigned int pathlen; 386 struct iattr * sattr; 387}; 388 389struct nfs_readdirargs { 390 struct nfs_fh * fh; 391 __u32 cookie; 392 unsigned int count; 393 struct page ** pages; 394}; 395 396struct nfs3_getaclargs { 397 struct nfs_fh * fh; 398 int mask; 399 struct page ** pages; 400}; 401 402struct 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 410struct nfs_diropok { 411 struct nfs_fh * fh; 412 struct nfs_fattr * fattr; 413}; 414 415struct nfs_readlinkargs { 416 struct nfs_fh * fh; 417 unsigned int pgbase; 418 unsigned int pglen; 419 struct page ** pages; 420}; 421 422struct nfs3_sattrargs { 423 struct nfs_fh * fh; 424 struct iattr * sattr; 425 unsigned int guard; 426 struct timespec guardtime; 427}; 428 429struct nfs3_diropargs { 430 struct nfs_fh * fh; 431 const char * name; 432 unsigned int len; 433}; 434 435struct nfs3_accessargs { 436 struct nfs_fh * fh; 437 __u32 access; 438}; 439 440struct nfs3_createargs { 441 struct nfs_fh * fh; 442 const char * name; 443 unsigned int len; 444 struct iattr * sattr; 445 enum nfs3_createmode createmode; 446 __be32 verifier[2]; 447}; 448 449struct nfs3_mkdirargs { 450 struct nfs_fh * fh; 451 const char * name; 452 unsigned int len; 453 struct iattr * sattr; 454}; 455 456struct nfs3_symlinkargs { 457 struct nfs_fh * fromfh; 458 const char * fromname; 459 unsigned int fromlen; 460 struct page ** pages; 461 unsigned int pathlen; 462 struct iattr * sattr; 463}; 464 465struct 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 474struct 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 483struct nfs3_linkargs { 484 struct nfs_fh * fromfh; 485 struct nfs_fh * tofh; 486 const char * toname; 487 unsigned int tolen; 488}; 489 490struct nfs3_readdirargs { 491 struct nfs_fh * fh; 492 __u64 cookie; 493 __be32 verf[2]; 494 int plus; 495 unsigned int count; 496 struct page ** pages; 497}; 498 499struct nfs3_diropres { 500 struct nfs_fattr * dir_attr; 501 struct nfs_fh * fh; 502 struct nfs_fattr * fattr; 503}; 504 505struct nfs3_accessres { 506 struct nfs_fattr * fattr; 507 __u32 access; 508}; 509 510struct nfs3_readlinkargs { 511 struct nfs_fh * fh; 512 unsigned int pgbase; 513 unsigned int pglen; 514 struct page ** pages; 515}; 516 517struct nfs3_renameres { 518 struct nfs_fattr * fromattr; 519 struct nfs_fattr * toattr; 520}; 521 522struct nfs3_linkres { 523 struct nfs_fattr * dir_attr; 524 struct nfs_fattr * fattr; 525}; 526 527struct nfs3_readdirres { 528 struct nfs_fattr * dir_attr; 529 __be32 * verf; 530 int plus; 531}; 532 533struct 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 542#ifdef CONFIG_NFS_V4 543 544typedef u64 clientid4; 545 546struct nfs4_accessargs { 547 const struct nfs_fh * fh; 548 const u32 * bitmask; 549 u32 access; 550}; 551 552struct nfs4_accessres { 553 const struct nfs_server * server; 554 struct nfs_fattr * fattr; 555 u32 supported; 556 u32 access; 557}; 558 559struct nfs4_create_arg { 560 u32 ftype; 561 union { 562 struct { 563 struct page ** pages; 564 unsigned int len; 565 } symlink; /* NF4LNK */ 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 578struct 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; 583 struct nfs_fattr * dir_fattr; 584}; 585 586struct nfs4_fsinfo_arg { 587 const struct nfs_fh * fh; 588 const u32 * bitmask; 589}; 590 591struct nfs4_getattr_arg { 592 const struct nfs_fh * fh; 593 const u32 * bitmask; 594}; 595 596struct nfs4_getattr_res { 597 const struct nfs_server * server; 598 struct nfs_fattr * fattr; 599}; 600 601struct nfs4_link_arg { 602 const struct nfs_fh * fh; 603 const struct nfs_fh * dir_fh; 604 const struct qstr * name; 605 const u32 * bitmask; 606}; 607 608struct 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 616struct nfs4_lookup_arg { 617 const struct nfs_fh * dir_fh; 618 const struct qstr * name; 619 const u32 * bitmask; 620}; 621 622struct nfs4_lookup_res { 623 const struct nfs_server * server; 624 struct nfs_fattr * fattr; 625 struct nfs_fh * fh; 626}; 627 628struct nfs4_lookup_root_arg { 629 const u32 * bitmask; 630}; 631 632struct nfs4_pathconf_arg { 633 const struct nfs_fh * fh; 634 const u32 * bitmask; 635}; 636 637struct 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 647struct nfs4_readdir_res { 648 nfs4_verifier verifier; 649 unsigned int pgbase; 650}; 651 652struct 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 659struct 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; 664 const u32 * bitmask; 665}; 666 667struct nfs4_rename_res { 668 const struct nfs_server * server; 669 struct nfs4_change_info old_cinfo; 670 struct nfs_fattr * old_fattr; 671 struct nfs4_change_info new_cinfo; 672 struct nfs_fattr * new_fattr; 673}; 674 675#define NFS4_SETCLIENTID_NAMELEN (56) 676struct nfs4_setclientid { 677 const nfs4_verifier * sc_verifier; 678 unsigned int sc_name_len; 679 char sc_name[NFS4_SETCLIENTID_NAMELEN]; 680 u32 sc_prog; 681 unsigned int sc_netid_len; 682 char sc_netid[RPCBIND_MAXNETIDLEN]; 683 unsigned int sc_uaddr_len; 684 char sc_uaddr[RPCBIND_MAXUADDRLEN]; 685 u32 sc_cb_ident; 686}; 687 688struct nfs4_statfs_arg { 689 const struct nfs_fh * fh; 690 const u32 * bitmask; 691}; 692 693struct nfs4_server_caps_res { 694 u32 attr_bitmask[2]; 695 u32 acl_bitmask; 696 u32 has_links; 697 u32 has_symlinks; 698}; 699 700struct nfs4_string { 701 unsigned int len; 702 char *data; 703}; 704 705#define NFS4_PATHNAME_MAXCOMPONENTS 512 706struct nfs4_pathname { 707 unsigned int ncomponents; 708 struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS]; 709}; 710 711#define NFS4_FS_LOCATION_MAXSERVERS 10 712struct 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 719struct nfs4_fs_locations { 720 struct nfs_fattr fattr; 721 const struct nfs_server *server; 722 struct nfs4_pathname fs_path; 723 int nlocations; 724 struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES]; 725}; 726 727struct 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 734#endif /* CONFIG_NFS_V4 */ 735 736struct nfs_page; 737 738#define NFS_PAGEVEC_SIZE (8U) 739 740struct 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 */ 748 struct page **pagevec; 749 unsigned int npages; /* Max length of pagevec */ 750 struct nfs_readargs args; 751 struct nfs_readres res; 752#ifdef CONFIG_NFS_V4 753 unsigned long timestamp; /* For lease renewal */ 754#endif 755 struct page *page_array[NFS_PAGEVEC_SIZE]; 756}; 757 758struct 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 */ 767 struct page **pagevec; 768 unsigned int npages; /* Max length of pagevec */ 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 774 struct page *page_array[NFS_PAGEVEC_SIZE]; 775}; 776 777struct nfs_access_entry; 778 779/* 780 * RPC procedure vector for NFSv2/NFSv3 demuxing 781 */ 782struct nfs_rpc_ops { 783 u32 version; /* Protocol version */ 784 struct dentry_operations *dentry_ops; 785 const struct inode_operations *dir_inode_ops; 786 const struct inode_operations *file_inode_ops; 787 788 int (*getroot) (struct nfs_server *, struct nfs_fh *, 789 struct nfs_fsinfo *); 790 int (*lookupfh)(struct nfs_server *, struct nfs_fh *, 791 struct qstr *, struct nfs_fh *, 792 struct nfs_fattr *); 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); 802 int (*create) (struct inode *, struct dentry *, 803 struct iattr *, int, struct nameidata *); 804 int (*remove) (struct inode *, struct qstr *); 805 void (*unlink_setup) (struct rpc_message *, struct inode *dir); 806 int (*unlink_done) (struct rpc_task *, struct inode *); 807 int (*rename) (struct inode *, struct qstr *, 808 struct inode *, struct qstr *); 809 int (*link) (struct inode *, struct inode *, struct qstr *); 810 int (*symlink) (struct inode *, struct dentry *, struct page *, 811 unsigned int, struct iattr *); 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 *); 824 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 825 __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus); 826 void (*read_setup) (struct nfs_read_data *, struct rpc_message *); 827 int (*read_done) (struct rpc_task *, struct nfs_read_data *); 828 void (*write_setup) (struct nfs_write_data *, struct rpc_message *); 829 int (*write_done) (struct rpc_task *, struct nfs_write_data *); 830 void (*commit_setup) (struct nfs_write_data *, struct rpc_message *); 831 int (*commit_done) (struct rpc_task *, struct nfs_write_data *); 832 int (*file_open) (struct inode *, struct file *); 833 int (*file_release) (struct inode *, struct file *); 834 int (*lock)(struct file *, int, struct file_lock *); 835 void (*clear_acl_cache)(struct inode *); 836}; 837 838/* 839 * NFS_CALL(getattr, inode, (fattr)); 840 * into 841 * NFS_PROTO(inode)->getattr(fattr); 842 */ 843#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args 844 845/* 846 * Function vectors etc. for the NFS client 847 */ 848extern const struct nfs_rpc_ops nfs_v2_clientops; 849extern const struct nfs_rpc_ops nfs_v3_clientops; 850extern const struct nfs_rpc_ops nfs_v4_clientops; 851extern struct rpc_version nfs_version2; 852extern struct rpc_version nfs_version3; 853extern struct rpc_version nfs_version4; 854 855extern struct rpc_version nfsacl_version3; 856extern struct rpc_program nfsacl_program; 857 858#endif