diff options
Diffstat (limited to 'include/linux/nfs_xdr.h')
| -rw-r--r-- | include/linux/nfs_xdr.h | 128 |
1 files changed, 83 insertions, 45 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index fc461926c412..ba6cc8f223c9 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -112,7 +112,9 @@ struct nfs_fsinfo { | |||
| 112 | __u32 wtmult; /* writes should be multiple of this */ | 112 | __u32 wtmult; /* writes should be multiple of this */ |
| 113 | __u32 dtpref; /* pref. readdir transfer size */ | 113 | __u32 dtpref; /* pref. readdir transfer size */ |
| 114 | __u64 maxfilesize; | 114 | __u64 maxfilesize; |
| 115 | struct timespec time_delta; /* server time granularity */ | ||
| 115 | __u32 lease_time; /* in seconds */ | 116 | __u32 lease_time; /* in seconds */ |
| 117 | __u32 layouttype; /* supported pnfs layout driver */ | ||
| 116 | }; | 118 | }; |
| 117 | 119 | ||
| 118 | struct nfs_fsstat { | 120 | struct nfs_fsstat { |
| @@ -170,7 +172,7 @@ struct nfs4_sequence_args { | |||
| 170 | 172 | ||
| 171 | struct nfs4_sequence_res { | 173 | struct nfs4_sequence_res { |
| 172 | struct nfs4_session *sr_session; | 174 | struct nfs4_session *sr_session; |
| 173 | u8 sr_slotid; /* slot used to send request */ | 175 | struct nfs4_slot *sr_slot; /* slot used to send request */ |
| 174 | int sr_status; /* sequence operation status */ | 176 | int sr_status; /* sequence operation status */ |
| 175 | unsigned long sr_renewal_time; | 177 | unsigned long sr_renewal_time; |
| 176 | u32 sr_status_flags; | 178 | u32 sr_status_flags; |
| @@ -185,6 +187,55 @@ struct nfs4_get_lease_time_res { | |||
| 185 | struct nfs4_sequence_res lr_seq_res; | 187 | struct nfs4_sequence_res lr_seq_res; |
| 186 | }; | 188 | }; |
| 187 | 189 | ||
| 190 | #define PNFS_LAYOUT_MAXSIZE 4096 | ||
| 191 | |||
| 192 | struct nfs4_layoutdriver_data { | ||
| 193 | __u32 len; | ||
| 194 | void *buf; | ||
| 195 | }; | ||
| 196 | |||
| 197 | struct pnfs_layout_range { | ||
| 198 | u32 iomode; | ||
| 199 | u64 offset; | ||
| 200 | u64 length; | ||
| 201 | }; | ||
| 202 | |||
| 203 | struct nfs4_layoutget_args { | ||
| 204 | __u32 type; | ||
| 205 | struct pnfs_layout_range range; | ||
| 206 | __u64 minlength; | ||
| 207 | __u32 maxcount; | ||
| 208 | struct inode *inode; | ||
| 209 | struct nfs_open_context *ctx; | ||
| 210 | struct nfs4_sequence_args seq_args; | ||
| 211 | }; | ||
| 212 | |||
| 213 | struct nfs4_layoutget_res { | ||
| 214 | __u32 return_on_close; | ||
| 215 | struct pnfs_layout_range range; | ||
| 216 | __u32 type; | ||
| 217 | nfs4_stateid stateid; | ||
| 218 | struct nfs4_layoutdriver_data layout; | ||
| 219 | struct nfs4_sequence_res seq_res; | ||
| 220 | }; | ||
| 221 | |||
| 222 | struct nfs4_layoutget { | ||
| 223 | struct nfs4_layoutget_args args; | ||
| 224 | struct nfs4_layoutget_res res; | ||
| 225 | struct pnfs_layout_segment **lsegpp; | ||
| 226 | int status; | ||
| 227 | }; | ||
| 228 | |||
| 229 | struct nfs4_getdeviceinfo_args { | ||
| 230 | struct pnfs_device *pdev; | ||
| 231 | struct nfs4_sequence_args seq_args; | ||
| 232 | }; | ||
| 233 | |||
| 234 | struct nfs4_getdeviceinfo_res { | ||
| 235 | struct pnfs_device *pdev; | ||
| 236 | struct nfs4_sequence_res seq_res; | ||
| 237 | }; | ||
| 238 | |||
| 188 | /* | 239 | /* |
| 189 | * Arguments to the open call. | 240 | * Arguments to the open call. |
| 190 | */ | 241 | */ |
| @@ -400,6 +451,27 @@ struct nfs_removeres { | |||
| 400 | }; | 451 | }; |
| 401 | 452 | ||
| 402 | /* | 453 | /* |
| 454 | * Common arguments to the rename call | ||
| 455 | */ | ||
| 456 | struct nfs_renameargs { | ||
| 457 | const struct nfs_fh *old_dir; | ||
| 458 | const struct nfs_fh *new_dir; | ||
| 459 | const struct qstr *old_name; | ||
| 460 | const struct qstr *new_name; | ||
| 461 | const u32 *bitmask; | ||
| 462 | struct nfs4_sequence_args seq_args; | ||
| 463 | }; | ||
| 464 | |||
| 465 | struct nfs_renameres { | ||
| 466 | const struct nfs_server *server; | ||
| 467 | struct nfs4_change_info old_cinfo; | ||
| 468 | struct nfs_fattr *old_fattr; | ||
| 469 | struct nfs4_change_info new_cinfo; | ||
| 470 | struct nfs_fattr *new_fattr; | ||
| 471 | struct nfs4_sequence_res seq_res; | ||
| 472 | }; | ||
| 473 | |||
| 474 | /* | ||
| 403 | * Argument struct for decode_entry function | 475 | * Argument struct for decode_entry function |
| 404 | */ | 476 | */ |
| 405 | struct nfs_entry { | 477 | struct nfs_entry { |
| @@ -434,15 +506,6 @@ struct nfs_createargs { | |||
| 434 | struct iattr * sattr; | 506 | struct iattr * sattr; |
| 435 | }; | 507 | }; |
| 436 | 508 | ||
| 437 | struct nfs_renameargs { | ||
| 438 | struct nfs_fh * fromfh; | ||
| 439 | const char * fromname; | ||
| 440 | unsigned int fromlen; | ||
| 441 | struct nfs_fh * tofh; | ||
| 442 | const char * toname; | ||
| 443 | unsigned int tolen; | ||
| 444 | }; | ||
| 445 | |||
| 446 | struct nfs_setattrargs { | 509 | struct nfs_setattrargs { |
| 447 | struct nfs_fh * fh; | 510 | struct nfs_fh * fh; |
| 448 | nfs4_stateid stateid; | 511 | nfs4_stateid stateid; |
| @@ -586,15 +649,6 @@ struct nfs3_mknodargs { | |||
| 586 | dev_t rdev; | 649 | dev_t rdev; |
| 587 | }; | 650 | }; |
| 588 | 651 | ||
| 589 | struct nfs3_renameargs { | ||
| 590 | struct nfs_fh * fromfh; | ||
| 591 | const char * fromname; | ||
| 592 | unsigned int fromlen; | ||
| 593 | struct nfs_fh * tofh; | ||
| 594 | const char * toname; | ||
| 595 | unsigned int tolen; | ||
| 596 | }; | ||
| 597 | |||
| 598 | struct nfs3_linkargs { | 652 | struct nfs3_linkargs { |
| 599 | struct nfs_fh * fromfh; | 653 | struct nfs_fh * fromfh; |
| 600 | struct nfs_fh * tofh; | 654 | struct nfs_fh * tofh; |
| @@ -629,11 +683,6 @@ struct nfs3_readlinkargs { | |||
| 629 | struct page ** pages; | 683 | struct page ** pages; |
| 630 | }; | 684 | }; |
| 631 | 685 | ||
| 632 | struct nfs3_renameres { | ||
| 633 | struct nfs_fattr * fromattr; | ||
| 634 | struct nfs_fattr * toattr; | ||
| 635 | }; | ||
| 636 | |||
| 637 | struct nfs3_linkres { | 686 | struct nfs3_linkres { |
| 638 | struct nfs_fattr * dir_attr; | 687 | struct nfs_fattr * dir_attr; |
| 639 | struct nfs_fattr * fattr; | 688 | struct nfs_fattr * fattr; |
| @@ -780,6 +829,7 @@ struct nfs4_readdir_arg { | |||
| 780 | struct page ** pages; /* zero-copy data */ | 829 | struct page ** pages; /* zero-copy data */ |
| 781 | unsigned int pgbase; /* zero-copy data */ | 830 | unsigned int pgbase; /* zero-copy data */ |
| 782 | const u32 * bitmask; | 831 | const u32 * bitmask; |
| 832 | int plus; | ||
| 783 | struct nfs4_sequence_args seq_args; | 833 | struct nfs4_sequence_args seq_args; |
| 784 | }; | 834 | }; |
| 785 | 835 | ||
| @@ -801,24 +851,6 @@ struct nfs4_readlink_res { | |||
| 801 | struct nfs4_sequence_res seq_res; | 851 | struct nfs4_sequence_res seq_res; |
| 802 | }; | 852 | }; |
| 803 | 853 | ||
| 804 | struct nfs4_rename_arg { | ||
| 805 | const struct nfs_fh * old_dir; | ||
| 806 | const struct nfs_fh * new_dir; | ||
| 807 | const struct qstr * old_name; | ||
| 808 | const struct qstr * new_name; | ||
| 809 | const u32 * bitmask; | ||
| 810 | struct nfs4_sequence_args seq_args; | ||
| 811 | }; | ||
| 812 | |||
| 813 | struct nfs4_rename_res { | ||
| 814 | const struct nfs_server * server; | ||
| 815 | struct nfs4_change_info old_cinfo; | ||
| 816 | struct nfs_fattr * old_fattr; | ||
| 817 | struct nfs4_change_info new_cinfo; | ||
| 818 | struct nfs_fattr * new_fattr; | ||
| 819 | struct nfs4_sequence_res seq_res; | ||
| 820 | }; | ||
| 821 | |||
| 822 | #define NFS4_SETCLIENTID_NAMELEN (127) | 854 | #define NFS4_SETCLIENTID_NAMELEN (127) |
| 823 | struct nfs4_setclientid { | 855 | struct nfs4_setclientid { |
| 824 | const nfs4_verifier * sc_verifier; | 856 | const nfs4_verifier * sc_verifier; |
| @@ -1032,19 +1064,21 @@ struct nfs_rpc_ops { | |||
| 1032 | int (*readlink)(struct inode *, struct page *, unsigned int, | 1064 | int (*readlink)(struct inode *, struct page *, unsigned int, |
| 1033 | unsigned int); | 1065 | unsigned int); |
| 1034 | int (*create) (struct inode *, struct dentry *, | 1066 | int (*create) (struct inode *, struct dentry *, |
| 1035 | struct iattr *, int, struct nameidata *); | 1067 | struct iattr *, int, struct nfs_open_context *); |
| 1036 | int (*remove) (struct inode *, struct qstr *); | 1068 | int (*remove) (struct inode *, struct qstr *); |
| 1037 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); | 1069 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
| 1038 | int (*unlink_done) (struct rpc_task *, struct inode *); | 1070 | int (*unlink_done) (struct rpc_task *, struct inode *); |
| 1039 | int (*rename) (struct inode *, struct qstr *, | 1071 | int (*rename) (struct inode *, struct qstr *, |
| 1040 | struct inode *, struct qstr *); | 1072 | struct inode *, struct qstr *); |
| 1073 | void (*rename_setup) (struct rpc_message *msg, struct inode *dir); | ||
| 1074 | int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir); | ||
| 1041 | int (*link) (struct inode *, struct inode *, struct qstr *); | 1075 | int (*link) (struct inode *, struct inode *, struct qstr *); |
| 1042 | int (*symlink) (struct inode *, struct dentry *, struct page *, | 1076 | int (*symlink) (struct inode *, struct dentry *, struct page *, |
| 1043 | unsigned int, struct iattr *); | 1077 | unsigned int, struct iattr *); |
| 1044 | int (*mkdir) (struct inode *, struct dentry *, struct iattr *); | 1078 | int (*mkdir) (struct inode *, struct dentry *, struct iattr *); |
| 1045 | int (*rmdir) (struct inode *, struct qstr *); | 1079 | int (*rmdir) (struct inode *, struct qstr *); |
| 1046 | int (*readdir) (struct dentry *, struct rpc_cred *, | 1080 | int (*readdir) (struct dentry *, struct rpc_cred *, |
| 1047 | u64, struct page *, unsigned int, int); | 1081 | u64, struct page **, unsigned int, int); |
| 1048 | int (*mknod) (struct inode *, struct dentry *, struct iattr *, | 1082 | int (*mknod) (struct inode *, struct dentry *, struct iattr *, |
| 1049 | dev_t); | 1083 | dev_t); |
| 1050 | int (*statfs) (struct nfs_server *, struct nfs_fh *, | 1084 | int (*statfs) (struct nfs_server *, struct nfs_fh *, |
| @@ -1054,7 +1088,7 @@ struct nfs_rpc_ops { | |||
| 1054 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, | 1088 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, |
| 1055 | struct nfs_pathconf *); | 1089 | struct nfs_pathconf *); |
| 1056 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); | 1090 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
| 1057 | __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus); | 1091 | __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus); |
| 1058 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); | 1092 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); |
| 1059 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); | 1093 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); |
| 1060 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); | 1094 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); |
| @@ -1065,6 +1099,10 @@ struct nfs_rpc_ops { | |||
| 1065 | int (*lock_check_bounds)(const struct file_lock *); | 1099 | int (*lock_check_bounds)(const struct file_lock *); |
| 1066 | void (*clear_acl_cache)(struct inode *); | 1100 | void (*clear_acl_cache)(struct inode *); |
| 1067 | void (*close_context)(struct nfs_open_context *ctx, int); | 1101 | void (*close_context)(struct nfs_open_context *ctx, int); |
| 1102 | struct inode * (*open_context) (struct inode *dir, | ||
| 1103 | struct nfs_open_context *ctx, | ||
| 1104 | int open_flags, | ||
| 1105 | struct iattr *iattr); | ||
| 1068 | }; | 1106 | }; |
| 1069 | 1107 | ||
| 1070 | /* | 1108 | /* |
