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/nfs_xdr.h | |
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/nfs_xdr.h')
-rw-r--r-- | include/linux/nfs_xdr.h | 61 |
1 files changed, 50 insertions, 11 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 7fafc4c546b7..7c7320fa51aa 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; |