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