diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:54:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:54:14 -0400 |
| commit | 1d77062b1402aef5b26e1d3776991126e8026bde (patch) | |
| tree | 96e4da18878f5fb2ae50b260e194b78803d4c7a9 /include/linux | |
| parent | 25581ad107be24b89d805da51a03d616f8f3d1be (diff) | |
| parent | 76a9f26c9e40e9c0ed5dc8f0cedd74e733f0088d (diff) | |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (51 commits)
nfs: remove nfs_put_link()
nfs-build-fix-99
git-nfs-build-fixes
Merge branch 'odirect'
NFS: alloc nfs_read/write_data as direct I/O is scheduled
NFS: Eliminate nfs_get_user_pages()
NFS: refactor nfs_direct_free_user_pages
NFS: remove user_addr, user_count, and pos from nfs_direct_req
NFS: "open code" the NFS direct write rescheduler
NFS: Separate functions for counting outstanding NFS direct I/Os
NLM: Fix reclaim races
NLM: sem to mutex conversion
locks.c: add the fl_owner to nlm_compare_locks
NFS: Display the chosen RPCSEC_GSS security flavour in /proc/mounts
NFS: Split fs/nfs/inode.c
NFS: Fix typo in nfs_do_clone_mount()
NFS: Fix compile errors introduced by referrals patches
NFSv4: Ensure that referral mounts bind to a reserved port
NFSv4: A root pathname is sent as a zero component4
NFSv4: Follow a referral
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 4 | ||||
| -rw-r--r-- | include/linux/mount.h | 8 | ||||
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 62 | ||||
| -rw-r--r-- | include/linux/nfs_fs_sb.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 5 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 61 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 1 |
9 files changed, 109 insertions, 38 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index dba4cbd157..2d8b348c11 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1100,7 +1100,7 @@ struct super_operations { | |||
| 1100 | int (*statfs) (struct dentry *, struct kstatfs *); | 1100 | int (*statfs) (struct dentry *, struct kstatfs *); |
| 1101 | int (*remount_fs) (struct super_block *, int *, char *); | 1101 | int (*remount_fs) (struct super_block *, int *, char *); |
| 1102 | void (*clear_inode) (struct inode *); | 1102 | void (*clear_inode) (struct inode *); |
| 1103 | void (*umount_begin) (struct super_block *); | 1103 | void (*umount_begin) (struct vfsmount *, int); |
| 1104 | 1104 | ||
| 1105 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1105 | int (*show_options)(struct seq_file *, struct vfsmount *); |
| 1106 | int (*show_stats)(struct seq_file *, struct vfsmount *); | 1106 | int (*show_stats)(struct seq_file *, struct vfsmount *); |
| @@ -1767,7 +1767,7 @@ extern struct inode_operations simple_dir_inode_operations; | |||
| 1767 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 1767 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
| 1768 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1768 | struct dentry *d_alloc_name(struct dentry *, const char *); |
| 1769 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1769 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
| 1770 | extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); | 1770 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
| 1771 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 1771 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
| 1772 | 1772 | ||
| 1773 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 1773 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index a8876bc651..aa4fe905bb 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -49,11 +49,12 @@ struct nlm_host { | |||
| 49 | h_killed : 1, | 49 | h_killed : 1, |
| 50 | h_monitored : 1; | 50 | h_monitored : 1; |
| 51 | wait_queue_head_t h_gracewait; /* wait while reclaiming */ | 51 | wait_queue_head_t h_gracewait; /* wait while reclaiming */ |
| 52 | struct rw_semaphore h_rwsem; /* Reboot recovery lock */ | ||
| 52 | u32 h_state; /* pseudo-state counter */ | 53 | u32 h_state; /* pseudo-state counter */ |
| 53 | u32 h_nsmstate; /* true remote NSM state */ | 54 | u32 h_nsmstate; /* true remote NSM state */ |
| 54 | u32 h_pidcount; /* Pseudopids */ | 55 | u32 h_pidcount; /* Pseudopids */ |
| 55 | atomic_t h_count; /* reference count */ | 56 | atomic_t h_count; /* reference count */ |
| 56 | struct semaphore h_sema; /* mutex for pmap binding */ | 57 | struct mutex h_mutex; /* mutex for pmap binding */ |
| 57 | unsigned long h_nextrebind; /* next portmap call */ | 58 | unsigned long h_nextrebind; /* next portmap call */ |
| 58 | unsigned long h_expires; /* eligible for GC */ | 59 | unsigned long h_expires; /* eligible for GC */ |
| 59 | struct list_head h_lockowners; /* Lockowners for the client */ | 60 | struct list_head h_lockowners; /* Lockowners for the client */ |
| @@ -219,6 +220,7 @@ static __inline__ int | |||
| 219 | nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) | 220 | nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) |
| 220 | { | 221 | { |
| 221 | return fl1->fl_pid == fl2->fl_pid | 222 | return fl1->fl_pid == fl2->fl_pid |
| 223 | && fl1->fl_owner == fl2->fl_owner | ||
| 222 | && fl1->fl_start == fl2->fl_start | 224 | && fl1->fl_start == fl2->fl_start |
| 223 | && fl1->fl_end == fl2->fl_end | 225 | && fl1->fl_end == fl2->fl_end |
| 224 | &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); | 226 | &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 60718f12ca..403d1a97c5 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -28,6 +28,8 @@ struct namespace; | |||
| 28 | #define MNT_NOATIME 0x08 | 28 | #define MNT_NOATIME 0x08 |
| 29 | #define MNT_NODIRATIME 0x10 | 29 | #define MNT_NODIRATIME 0x10 |
| 30 | 30 | ||
| 31 | #define MNT_SHRINKABLE 0x100 | ||
| 32 | |||
| 31 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ | 33 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ |
| 32 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ | 34 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ |
| 33 | #define MNT_PNODE_MASK 0x3000 /* propogation flag mask */ | 35 | #define MNT_PNODE_MASK 0x3000 /* propogation flag mask */ |
| @@ -78,12 +80,18 @@ extern struct vfsmount *alloc_vfsmnt(const char *name); | |||
| 78 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, | 80 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, |
| 79 | const char *name, void *data); | 81 | const char *name, void *data); |
| 80 | 82 | ||
| 83 | struct file_system_type; | ||
| 84 | extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, | ||
| 85 | int flags, const char *name, | ||
| 86 | void *data); | ||
| 87 | |||
| 81 | struct nameidata; | 88 | struct nameidata; |
| 82 | 89 | ||
| 83 | extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd, | 90 | extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd, |
| 84 | int mnt_flags, struct list_head *fslist); | 91 | int mnt_flags, struct list_head *fslist); |
| 85 | 92 | ||
| 86 | extern void mark_mounts_for_expiry(struct list_head *mounts); | 93 | extern void mark_mounts_for_expiry(struct list_head *mounts); |
| 94 | extern void shrink_submounts(struct vfsmount *mountpoint, struct list_head *mounts); | ||
| 87 | 95 | ||
| 88 | extern spinlock_t vfsmount_lock; | 96 | extern spinlock_t vfsmount_lock; |
| 89 | extern dev_t name_to_dev_t(char *name); | 97 | extern dev_t name_to_dev_t(char *name); |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 1059e6d69d..5f681d5342 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -384,6 +384,7 @@ enum { | |||
| 384 | NFSPROC4_CLNT_DELEGRETURN, | 384 | NFSPROC4_CLNT_DELEGRETURN, |
| 385 | NFSPROC4_CLNT_GETACL, | 385 | NFSPROC4_CLNT_GETACL, |
| 386 | NFSPROC4_CLNT_SETACL, | 386 | NFSPROC4_CLNT_SETACL, |
| 387 | NFSPROC4_CLNT_FS_LOCATIONS, | ||
| 387 | }; | 388 | }; |
| 388 | 389 | ||
| 389 | #endif | 390 | #endif |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 7e079f8ce1..0a1740b253 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -9,6 +9,27 @@ | |||
| 9 | #ifndef _LINUX_NFS_FS_H | 9 | #ifndef _LINUX_NFS_FS_H |
| 10 | #define _LINUX_NFS_FS_H | 10 | #define _LINUX_NFS_FS_H |
| 11 | 11 | ||
| 12 | #include <linux/config.h> | ||
| 13 | #include <linux/in.h> | ||
| 14 | #include <linux/mm.h> | ||
| 15 | #include <linux/pagemap.h> | ||
| 16 | #include <linux/rwsem.h> | ||
| 17 | #include <linux/wait.h> | ||
| 18 | |||
| 19 | #include <linux/sunrpc/debug.h> | ||
| 20 | #include <linux/sunrpc/auth.h> | ||
| 21 | #include <linux/sunrpc/clnt.h> | ||
| 22 | |||
| 23 | #include <linux/nfs.h> | ||
| 24 | #include <linux/nfs2.h> | ||
| 25 | #include <linux/nfs3.h> | ||
| 26 | #include <linux/nfs4.h> | ||
| 27 | #include <linux/nfs_xdr.h> | ||
| 28 | |||
| 29 | #include <linux/nfs_fs_sb.h> | ||
| 30 | |||
| 31 | #include <linux/rwsem.h> | ||
| 32 | #include <linux/mempool.h> | ||
| 12 | 33 | ||
| 13 | /* | 34 | /* |
| 14 | * Enable debugging support for nfs client. | 35 | * Enable debugging support for nfs client. |
| @@ -41,27 +62,9 @@ | |||
| 41 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 62 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
| 42 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 63 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
| 43 | #define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ | 64 | #define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ |
| 65 | #define FLUSH_INVALIDATE 64 /* Invalidate the page cache */ | ||
| 44 | 66 | ||
| 45 | #ifdef __KERNEL__ | 67 | #ifdef __KERNEL__ |
| 46 | #include <linux/in.h> | ||
| 47 | #include <linux/mm.h> | ||
| 48 | #include <linux/pagemap.h> | ||
| 49 | #include <linux/rwsem.h> | ||
| 50 | #include <linux/wait.h> | ||
| 51 | |||
| 52 | #include <linux/nfs_fs_sb.h> | ||
| 53 | |||
| 54 | #include <linux/sunrpc/debug.h> | ||
| 55 | #include <linux/sunrpc/auth.h> | ||
| 56 | #include <linux/sunrpc/clnt.h> | ||
| 57 | |||
| 58 | #include <linux/nfs.h> | ||
| 59 | #include <linux/nfs2.h> | ||
| 60 | #include <linux/nfs3.h> | ||
| 61 | #include <linux/nfs4.h> | ||
| 62 | #include <linux/nfs_xdr.h> | ||
| 63 | #include <linux/rwsem.h> | ||
| 64 | #include <linux/mempool.h> | ||
| 65 | 68 | ||
| 66 | /* | 69 | /* |
| 67 | * NFSv3/v4 Access mode cache entry | 70 | * NFSv3/v4 Access mode cache entry |
| @@ -233,8 +236,12 @@ static inline int nfs_caches_unstable(struct inode *inode) | |||
| 233 | 236 | ||
| 234 | static inline void nfs_mark_for_revalidate(struct inode *inode) | 237 | static inline void nfs_mark_for_revalidate(struct inode *inode) |
| 235 | { | 238 | { |
| 239 | struct nfs_inode *nfsi = NFS_I(inode); | ||
| 240 | |||
| 236 | spin_lock(&inode->i_lock); | 241 | spin_lock(&inode->i_lock); |
| 237 | NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; | 242 | nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS; |
| 243 | if (S_ISDIR(inode->i_mode)) | ||
| 244 | nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; | ||
| 238 | spin_unlock(&inode->i_lock); | 245 | spin_unlock(&inode->i_lock); |
| 239 | } | 246 | } |
| 240 | 247 | ||
| @@ -296,7 +303,7 @@ extern int nfs_release(struct inode *, struct file *); | |||
| 296 | extern int nfs_attribute_timeout(struct inode *inode); | 303 | extern int nfs_attribute_timeout(struct inode *inode); |
| 297 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); | 304 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); |
| 298 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); | 305 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
| 299 | extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); | 306 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); |
| 300 | extern int nfs_setattr(struct dentry *, struct iattr *); | 307 | extern int nfs_setattr(struct dentry *, struct iattr *); |
| 301 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | 308 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); |
| 302 | extern void nfs_begin_attr_update(struct inode *); | 309 | extern void nfs_begin_attr_update(struct inode *); |
| @@ -306,6 +313,10 @@ extern void nfs_end_data_update(struct inode *); | |||
| 306 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 313 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
| 307 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 314 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
| 308 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); | 315 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); |
| 316 | extern struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent, | ||
| 317 | const struct dentry *dentry, | ||
| 318 | struct nfs_fh *fh, | ||
| 319 | struct nfs_fattr *fattr); | ||
| 309 | 320 | ||
| 310 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 321 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
| 311 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ | 322 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ |
| @@ -392,6 +403,15 @@ extern void nfs_unregister_sysctl(void); | |||
| 392 | #endif | 403 | #endif |
| 393 | 404 | ||
| 394 | /* | 405 | /* |
| 406 | * linux/fs/nfs/namespace.c | ||
| 407 | */ | ||
| 408 | extern struct list_head nfs_automount_list; | ||
| 409 | extern struct inode_operations nfs_mountpoint_inode_operations; | ||
| 410 | extern struct inode_operations nfs_referral_inode_operations; | ||
| 411 | extern int nfs_mountpoint_expiry_timeout; | ||
| 412 | extern void nfs_release_automount_timer(void); | ||
| 413 | |||
| 414 | /* | ||
| 395 | * linux/fs/nfs/unlink.c | 415 | * linux/fs/nfs/unlink.c |
| 396 | */ | 416 | */ |
| 397 | extern int nfs_async_unlink(struct dentry *); | 417 | extern int nfs_async_unlink(struct dentry *); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 65dec21af7..6b4a13c794 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -35,6 +35,7 @@ struct nfs_server { | |||
| 35 | char * hostname; /* remote hostname */ | 35 | char * hostname; /* remote hostname */ |
| 36 | struct nfs_fh fh; | 36 | struct nfs_fh fh; |
| 37 | struct sockaddr_in addr; | 37 | struct sockaddr_in addr; |
| 38 | struct nfs_fsid fsid; | ||
| 38 | unsigned long mount_time; /* when this fs was mounted */ | 39 | unsigned long mount_time; /* when this fs was mounted */ |
| 39 | #ifdef CONFIG_NFS_V4 | 40 | #ifdef CONFIG_NFS_V4 |
| 40 | /* Our own IP address, as a null-terminated string. | 41 | /* Our own IP address, as a null-terminated string. |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 66e2ed6585..1f7bd287c2 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
| 15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
| 16 | #include <linux/nfs_fs_sb.h> | ||
| 17 | #include <linux/sunrpc/auth.h> | 16 | #include <linux/sunrpc/auth.h> |
| 18 | #include <linux/nfs_xdr.h> | 17 | #include <linux/nfs_xdr.h> |
| 19 | 18 | ||
| @@ -63,8 +62,8 @@ extern void nfs_release_request(struct nfs_page *req); | |||
| 63 | 62 | ||
| 64 | extern int nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst, | 63 | extern int nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst, |
| 65 | unsigned long idx_start, unsigned int npages); | 64 | unsigned long idx_start, unsigned int npages); |
| 66 | extern int nfs_scan_list(struct list_head *, struct list_head *, | 65 | extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, struct list_head *dst, |
| 67 | unsigned long, unsigned int); | 66 | unsigned long idx_start, unsigned int npages); |
| 68 | extern int nfs_coalesce_requests(struct list_head *, struct list_head *, | 67 | extern int nfs_coalesce_requests(struct list_head *, struct list_head *, |
| 69 | unsigned int); | 68 | unsigned int); |
| 70 | extern int nfs_wait_on_request(struct nfs_page *); | 69 | extern int nfs_wait_on_request(struct nfs_page *); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 7fafc4c546..7c7320fa51 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -14,11 +14,19 @@ | |||
| 14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | 14 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
| 15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | 15 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
| 16 | 16 | ||
| 17 | struct nfs4_fsid { | 17 | struct nfs_fsid { |
| 18 | __u64 major; | 18 | uint64_t major; |
| 19 | __u64 minor; | 19 | uint64_t minor; |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | /* | ||
| 23 | * Helper for checking equality between 2 fsids. | ||
| 24 | */ | ||
| 25 | static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b) | ||
| 26 | { | ||
| 27 | return a->major == b->major && a->minor == b->minor; | ||
| 28 | } | ||
| 29 | |||
| 22 | struct nfs_fattr { | 30 | struct nfs_fattr { |
| 23 | unsigned short valid; /* which fields are valid */ | 31 | unsigned short valid; /* which fields are valid */ |
| 24 | __u64 pre_size; /* pre_op_attr.size */ | 32 | __u64 pre_size; /* pre_op_attr.size */ |
| @@ -40,10 +48,7 @@ struct nfs_fattr { | |||
| 40 | } nfs3; | 48 | } nfs3; |
| 41 | } du; | 49 | } du; |
| 42 | dev_t rdev; | 50 | dev_t rdev; |
| 43 | union { | 51 | struct nfs_fsid fsid; |
| 44 | __u64 nfs3; /* also nfs2 */ | ||
| 45 | struct nfs4_fsid nfs4; | ||
| 46 | } fsid_u; | ||
| 47 | __u64 fileid; | 52 | __u64 fileid; |
| 48 | struct timespec atime; | 53 | struct timespec atime; |
| 49 | struct timespec mtime; | 54 | struct timespec mtime; |
| @@ -57,8 +62,8 @@ struct nfs_fattr { | |||
| 57 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ | 62 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ |
| 58 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ | 63 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ |
| 59 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ | 64 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ |
| 60 | #define NFS_ATTR_FATTR_V4 0x0008 | 65 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ |
| 61 | #define NFS_ATTR_PRE_CHANGE 0x0010 | 66 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0010 /* NFSv4 referral */ |
| 62 | 67 | ||
| 63 | /* | 68 | /* |
| 64 | * Info on the file system | 69 | * Info on the file system |
| @@ -675,6 +680,40 @@ struct nfs4_server_caps_res { | |||
| 675 | u32 has_symlinks; | 680 | u32 has_symlinks; |
| 676 | }; | 681 | }; |
| 677 | 682 | ||
| 683 | struct nfs4_string { | ||
| 684 | unsigned int len; | ||
| 685 | char *data; | ||
| 686 | }; | ||
| 687 | |||
| 688 | #define NFS4_PATHNAME_MAXCOMPONENTS 512 | ||
| 689 | struct nfs4_pathname { | ||
| 690 | unsigned int ncomponents; | ||
| 691 | struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS]; | ||
| 692 | }; | ||
| 693 | |||
| 694 | #define NFS4_FS_LOCATION_MAXSERVERS 10 | ||
| 695 | struct nfs4_fs_location { | ||
| 696 | unsigned int nservers; | ||
| 697 | struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS]; | ||
| 698 | struct nfs4_pathname rootpath; | ||
| 699 | }; | ||
| 700 | |||
| 701 | #define NFS4_FS_LOCATIONS_MAXENTRIES 10 | ||
| 702 | struct nfs4_fs_locations { | ||
| 703 | struct nfs_fattr fattr; | ||
| 704 | const struct nfs_server *server; | ||
| 705 | struct nfs4_pathname fs_path; | ||
| 706 | int nlocations; | ||
| 707 | struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES]; | ||
| 708 | }; | ||
| 709 | |||
| 710 | struct nfs4_fs_locations_arg { | ||
| 711 | const struct nfs_fh *dir_fh; | ||
| 712 | const struct qstr *name; | ||
| 713 | struct page *page; | ||
| 714 | const u32 *bitmask; | ||
| 715 | }; | ||
| 716 | |||
| 678 | #endif /* CONFIG_NFS_V4 */ | 717 | #endif /* CONFIG_NFS_V4 */ |
| 679 | 718 | ||
| 680 | struct nfs_page; | 719 | struct nfs_page; |
| @@ -695,7 +734,7 @@ struct nfs_read_data { | |||
| 695 | #ifdef CONFIG_NFS_V4 | 734 | #ifdef CONFIG_NFS_V4 |
| 696 | unsigned long timestamp; /* For lease renewal */ | 735 | unsigned long timestamp; /* For lease renewal */ |
| 697 | #endif | 736 | #endif |
| 698 | struct page *page_array[NFS_PAGEVEC_SIZE + 1]; | 737 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
| 699 | }; | 738 | }; |
| 700 | 739 | ||
| 701 | struct nfs_write_data { | 740 | struct nfs_write_data { |
| @@ -713,7 +752,7 @@ struct nfs_write_data { | |||
| 713 | #ifdef CONFIG_NFS_V4 | 752 | #ifdef CONFIG_NFS_V4 |
| 714 | unsigned long timestamp; /* For lease renewal */ | 753 | unsigned long timestamp; /* For lease renewal */ |
| 715 | #endif | 754 | #endif |
| 716 | struct page *page_array[NFS_PAGEVEC_SIZE + 1]; | 755 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
| 717 | }; | 756 | }; |
| 718 | 757 | ||
| 719 | struct nfs_access_entry; | 758 | struct nfs_access_entry; |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 84c35d42d2..e6d3d34950 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -194,6 +194,7 @@ extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | |||
| 194 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); | 194 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); |
| 195 | extern uint32_t *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 195 | extern uint32_t *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
| 196 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 196 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
| 197 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | ||
| 197 | 198 | ||
| 198 | #endif /* __KERNEL__ */ | 199 | #endif /* __KERNEL__ */ |
| 199 | 200 | ||
