aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h78
1 files changed, 33 insertions, 45 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index fc461926c412..da7a1300dc60 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -112,6 +112,7 @@ 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 */
116}; 117};
117 118
@@ -170,7 +171,7 @@ struct nfs4_sequence_args {
170 171
171struct nfs4_sequence_res { 172struct nfs4_sequence_res {
172 struct nfs4_session *sr_session; 173 struct nfs4_session *sr_session;
173 u8 sr_slotid; /* slot used to send request */ 174 struct nfs4_slot *sr_slot; /* slot used to send request */
174 int sr_status; /* sequence operation status */ 175 int sr_status; /* sequence operation status */
175 unsigned long sr_renewal_time; 176 unsigned long sr_renewal_time;
176 u32 sr_status_flags; 177 u32 sr_status_flags;
@@ -400,6 +401,27 @@ struct nfs_removeres {
400}; 401};
401 402
402/* 403/*
404 * Common arguments to the rename call
405 */
406struct nfs_renameargs {
407 const struct nfs_fh *old_dir;
408 const struct nfs_fh *new_dir;
409 const struct qstr *old_name;
410 const struct qstr *new_name;
411 const u32 *bitmask;
412 struct nfs4_sequence_args seq_args;
413};
414
415struct nfs_renameres {
416 const struct nfs_server *server;
417 struct nfs4_change_info old_cinfo;
418 struct nfs_fattr *old_fattr;
419 struct nfs4_change_info new_cinfo;
420 struct nfs_fattr *new_fattr;
421 struct nfs4_sequence_res seq_res;
422};
423
424/*
403 * Argument struct for decode_entry function 425 * Argument struct for decode_entry function
404 */ 426 */
405struct nfs_entry { 427struct nfs_entry {
@@ -434,15 +456,6 @@ struct nfs_createargs {
434 struct iattr * sattr; 456 struct iattr * sattr;
435}; 457};
436 458
437struct 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
446struct nfs_setattrargs { 459struct nfs_setattrargs {
447 struct nfs_fh * fh; 460 struct nfs_fh * fh;
448 nfs4_stateid stateid; 461 nfs4_stateid stateid;
@@ -586,15 +599,6 @@ struct nfs3_mknodargs {
586 dev_t rdev; 599 dev_t rdev;
587}; 600};
588 601
589struct 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
598struct nfs3_linkargs { 602struct nfs3_linkargs {
599 struct nfs_fh * fromfh; 603 struct nfs_fh * fromfh;
600 struct nfs_fh * tofh; 604 struct nfs_fh * tofh;
@@ -629,11 +633,6 @@ struct nfs3_readlinkargs {
629 struct page ** pages; 633 struct page ** pages;
630}; 634};
631 635
632struct nfs3_renameres {
633 struct nfs_fattr * fromattr;
634 struct nfs_fattr * toattr;
635};
636
637struct nfs3_linkres { 636struct nfs3_linkres {
638 struct nfs_fattr * dir_attr; 637 struct nfs_fattr * dir_attr;
639 struct nfs_fattr * fattr; 638 struct nfs_fattr * fattr;
@@ -780,6 +779,7 @@ struct nfs4_readdir_arg {
780 struct page ** pages; /* zero-copy data */ 779 struct page ** pages; /* zero-copy data */
781 unsigned int pgbase; /* zero-copy data */ 780 unsigned int pgbase; /* zero-copy data */
782 const u32 * bitmask; 781 const u32 * bitmask;
782 int plus;
783 struct nfs4_sequence_args seq_args; 783 struct nfs4_sequence_args seq_args;
784}; 784};
785 785
@@ -801,24 +801,6 @@ struct nfs4_readlink_res {
801 struct nfs4_sequence_res seq_res; 801 struct nfs4_sequence_res seq_res;
802}; 802};
803 803
804struct 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
813struct 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) 804#define NFS4_SETCLIENTID_NAMELEN (127)
823struct nfs4_setclientid { 805struct nfs4_setclientid {
824 const nfs4_verifier * sc_verifier; 806 const nfs4_verifier * sc_verifier;
@@ -1032,19 +1014,21 @@ struct nfs_rpc_ops {
1032 int (*readlink)(struct inode *, struct page *, unsigned int, 1014 int (*readlink)(struct inode *, struct page *, unsigned int,
1033 unsigned int); 1015 unsigned int);
1034 int (*create) (struct inode *, struct dentry *, 1016 int (*create) (struct inode *, struct dentry *,
1035 struct iattr *, int, struct nameidata *); 1017 struct iattr *, int, struct nfs_open_context *);
1036 int (*remove) (struct inode *, struct qstr *); 1018 int (*remove) (struct inode *, struct qstr *);
1037 void (*unlink_setup) (struct rpc_message *, struct inode *dir); 1019 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
1038 int (*unlink_done) (struct rpc_task *, struct inode *); 1020 int (*unlink_done) (struct rpc_task *, struct inode *);
1039 int (*rename) (struct inode *, struct qstr *, 1021 int (*rename) (struct inode *, struct qstr *,
1040 struct inode *, struct qstr *); 1022 struct inode *, struct qstr *);
1023 void (*rename_setup) (struct rpc_message *msg, struct inode *dir);
1024 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
1041 int (*link) (struct inode *, struct inode *, struct qstr *); 1025 int (*link) (struct inode *, struct inode *, struct qstr *);
1042 int (*symlink) (struct inode *, struct dentry *, struct page *, 1026 int (*symlink) (struct inode *, struct dentry *, struct page *,
1043 unsigned int, struct iattr *); 1027 unsigned int, struct iattr *);
1044 int (*mkdir) (struct inode *, struct dentry *, struct iattr *); 1028 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
1045 int (*rmdir) (struct inode *, struct qstr *); 1029 int (*rmdir) (struct inode *, struct qstr *);
1046 int (*readdir) (struct dentry *, struct rpc_cred *, 1030 int (*readdir) (struct dentry *, struct rpc_cred *,
1047 u64, struct page *, unsigned int, int); 1031 u64, struct page **, unsigned int, int);
1048 int (*mknod) (struct inode *, struct dentry *, struct iattr *, 1032 int (*mknod) (struct inode *, struct dentry *, struct iattr *,
1049 dev_t); 1033 dev_t);
1050 int (*statfs) (struct nfs_server *, struct nfs_fh *, 1034 int (*statfs) (struct nfs_server *, struct nfs_fh *,
@@ -1054,7 +1038,7 @@ struct nfs_rpc_ops {
1054 int (*pathconf) (struct nfs_server *, struct nfs_fh *, 1038 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
1055 struct nfs_pathconf *); 1039 struct nfs_pathconf *);
1056 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 1040 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1057 __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus); 1041 __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 *); 1042 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
1059 int (*read_done) (struct rpc_task *, struct nfs_read_data *); 1043 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1060 void (*write_setup) (struct nfs_write_data *, struct rpc_message *); 1044 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
@@ -1065,6 +1049,10 @@ struct nfs_rpc_ops {
1065 int (*lock_check_bounds)(const struct file_lock *); 1049 int (*lock_check_bounds)(const struct file_lock *);
1066 void (*clear_acl_cache)(struct inode *); 1050 void (*clear_acl_cache)(struct inode *);
1067 void (*close_context)(struct nfs_open_context *ctx, int); 1051 void (*close_context)(struct nfs_open_context *ctx, int);
1052 struct inode * (*open_context) (struct inode *dir,
1053 struct nfs_open_context *ctx,
1054 int open_flags,
1055 struct iattr *iattr);
1068}; 1056};
1069 1057
1070/* 1058/*