diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-25 13:03:28 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-25 13:03:28 -0400 |
| commit | 40471856f2e38e9bfa8d605295e8234421110dd6 (patch) | |
| tree | 9757e42e40bdbfcff7c52ab133e32b5c2203153b /include/linux | |
| parent | ae005cbed12d0b340b04b59d6f5c56e710b3895d (diff) | |
| parent | 0acd2201920d0968919f4f5797d63f7b6f2b19d4 (diff) | |
Merge branch 'nfs-for-2.6.39' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.39' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (28 commits)
Cleanup XDR parsing for LAYOUTGET, GETDEVICEINFO
NFSv4.1 convert layoutcommit sync to boolean
NFSv4.1 pnfs_layoutcommit_inode fixes
NFS: Determine initial mount security
NFS: use secinfo when crossing mountpoints
NFS: Add secinfo procedure
NFS: lookup supports alternate client
NFS: convert call_sync() to a function
NFSv4.1 remove temp code that prevented ds commits
NFSv4.1: layoutcommit
NFSv4.1: filelayout driver specific code for COMMIT
NFSv4.1: remove GETATTR from ds commits
NFSv4.1: add generic layer hooks for pnfs COMMIT
NFSv4.1: alloc and free commit_buckets
NFSv4.1: shift filelayout_free_lseg
NFSv4.1: pull out code from nfs_commit_release
NFSv4.1: pull error handling out of nfs_commit_list
NFSv4.1: add callback to nfs4_commit_done
NFSv4.1: rearrange nfs_commit_rpcsetup
NFSv4.1: don't send COMMIT to ds for data sync writes
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 10 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 7 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 70 | ||||
| -rw-r--r-- | include/linux/sunrpc/gss_api.h | 3 |
5 files changed, 88 insertions, 4 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 134716e5e350..b528f6d4b860 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -550,6 +550,7 @@ enum { | |||
| 550 | NFSPROC4_CLNT_SETACL, | 550 | NFSPROC4_CLNT_SETACL, |
| 551 | NFSPROC4_CLNT_FS_LOCATIONS, | 551 | NFSPROC4_CLNT_FS_LOCATIONS, |
| 552 | NFSPROC4_CLNT_RELEASE_LOCKOWNER, | 552 | NFSPROC4_CLNT_RELEASE_LOCKOWNER, |
| 553 | NFSPROC4_CLNT_SECINFO, | ||
| 553 | 554 | ||
| 554 | /* nfs41 */ | 555 | /* nfs41 */ |
| 555 | NFSPROC4_CLNT_EXCHANGE_ID, | 556 | NFSPROC4_CLNT_EXCHANGE_ID, |
| @@ -560,6 +561,7 @@ enum { | |||
| 560 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 561 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
| 561 | NFSPROC4_CLNT_LAYOUTGET, | 562 | NFSPROC4_CLNT_LAYOUTGET, |
| 562 | NFSPROC4_CLNT_GETDEVICEINFO, | 563 | NFSPROC4_CLNT_GETDEVICEINFO, |
| 564 | NFSPROC4_CLNT_LAYOUTCOMMIT, | ||
| 563 | }; | 565 | }; |
| 564 | 566 | ||
| 565 | /* nfs41 types */ | 567 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f88522b10a38..1b93b9c60e55 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ | 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
| 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
| 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
| 36 | #define FLUSH_COND_STABLE 32 /* conditional stable write - only stable | ||
| 37 | * if everything fits in one RPC */ | ||
| 36 | 38 | ||
| 37 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
| 38 | 40 | ||
| @@ -93,8 +95,13 @@ struct nfs_open_context { | |||
| 93 | int error; | 95 | int error; |
| 94 | 96 | ||
| 95 | struct list_head list; | 97 | struct list_head list; |
| 98 | }; | ||
| 96 | 99 | ||
| 100 | struct nfs_open_dir_context { | ||
| 101 | struct rpc_cred *cred; | ||
| 97 | __u64 dir_cookie; | 102 | __u64 dir_cookie; |
| 103 | __u64 dup_cookie; | ||
| 104 | int duped; | ||
| 98 | }; | 105 | }; |
| 99 | 106 | ||
| 100 | /* | 107 | /* |
| @@ -191,6 +198,7 @@ struct nfs_inode { | |||
| 191 | 198 | ||
| 192 | /* pNFS layout information */ | 199 | /* pNFS layout information */ |
| 193 | struct pnfs_layout_hdr *layout; | 200 | struct pnfs_layout_hdr *layout; |
| 201 | atomic_t commits_outstanding; | ||
| 194 | #endif /* CONFIG_NFS_V4*/ | 202 | #endif /* CONFIG_NFS_V4*/ |
| 195 | #ifdef CONFIG_NFS_FSCACHE | 203 | #ifdef CONFIG_NFS_FSCACHE |
| 196 | struct fscache_cookie *fscache; | 204 | struct fscache_cookie *fscache; |
| @@ -219,6 +227,8 @@ struct nfs_inode { | |||
| 219 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 227 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
| 220 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 228 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
| 221 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | 229 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ |
| 230 | #define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */ | ||
| 231 | #define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */ | ||
| 222 | 232 | ||
| 223 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 233 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
| 224 | { | 234 | { |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 90907ada6d52..8023e4e25133 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -33,11 +33,15 @@ enum { | |||
| 33 | PG_CLEAN, | 33 | PG_CLEAN, |
| 34 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
| 35 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
| 36 | PG_PNFS_COMMIT, | ||
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | struct nfs_inode; | 39 | struct nfs_inode; |
| 39 | struct nfs_page { | 40 | struct nfs_page { |
| 40 | struct list_head wb_list; /* Defines state of page: */ | 41 | union { |
| 42 | struct list_head wb_list; /* Defines state of page: */ | ||
| 43 | struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */ | ||
| 44 | }; | ||
| 41 | struct page *wb_page; /* page to read in/write out */ | 45 | struct page *wb_page; /* page to read in/write out */ |
| 42 | struct nfs_open_context *wb_context; /* File state context info */ | 46 | struct nfs_open_context *wb_context; /* File state context info */ |
| 43 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 47 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
| @@ -57,6 +61,7 @@ struct nfs_pageio_descriptor { | |||
| 57 | size_t pg_count; | 61 | size_t pg_count; |
| 58 | size_t pg_bsize; | 62 | size_t pg_bsize; |
| 59 | unsigned int pg_base; | 63 | unsigned int pg_base; |
| 64 | char pg_moreio; | ||
| 60 | 65 | ||
| 61 | struct inode *pg_inode; | 66 | struct inode *pg_inode; |
| 62 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 67 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2c2c67d2eb42..78b101e487ea 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/nfsacl.h> | 4 | #include <linux/nfsacl.h> |
| 5 | #include <linux/nfs3.h> | 5 | #include <linux/nfs3.h> |
| 6 | #include <linux/sunrpc/gss_api.h> | ||
| 6 | 7 | ||
| 7 | /* | 8 | /* |
| 8 | * To change the maximum rsize and wsize supported by the NFS client, adjust | 9 | * To change the maximum rsize and wsize supported by the NFS client, adjust |
| @@ -14,6 +15,9 @@ | |||
| 14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | 15 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
| 15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | 16 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
| 16 | 17 | ||
| 18 | /* Forward declaration for NFS v3 */ | ||
| 19 | struct nfs4_secinfo_flavors; | ||
| 20 | |||
| 17 | struct nfs_fsid { | 21 | struct nfs_fsid { |
| 18 | uint64_t major; | 22 | uint64_t major; |
| 19 | uint64_t minor; | 23 | uint64_t minor; |
| @@ -78,6 +82,7 @@ struct nfs_fattr { | |||
| 78 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) | 82 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) |
| 79 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | 83 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) |
| 80 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | 84 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ |
| 85 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ | ||
| 81 | 86 | ||
| 82 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 87 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
| 83 | | NFS_ATTR_FATTR_MODE \ | 88 | | NFS_ATTR_FATTR_MODE \ |
| @@ -190,8 +195,9 @@ struct nfs4_get_lease_time_res { | |||
| 190 | #define PNFS_LAYOUT_MAXSIZE 4096 | 195 | #define PNFS_LAYOUT_MAXSIZE 4096 |
| 191 | 196 | ||
| 192 | struct nfs4_layoutdriver_data { | 197 | struct nfs4_layoutdriver_data { |
| 198 | struct page **pages; | ||
| 199 | __u32 pglen; | ||
| 193 | __u32 len; | 200 | __u32 len; |
| 194 | void *buf; | ||
| 195 | }; | 201 | }; |
| 196 | 202 | ||
| 197 | struct pnfs_layout_range { | 203 | struct pnfs_layout_range { |
| @@ -209,6 +215,7 @@ struct nfs4_layoutget_args { | |||
| 209 | struct nfs_open_context *ctx; | 215 | struct nfs_open_context *ctx; |
| 210 | struct nfs4_sequence_args seq_args; | 216 | struct nfs4_sequence_args seq_args; |
| 211 | nfs4_stateid stateid; | 217 | nfs4_stateid stateid; |
| 218 | struct nfs4_layoutdriver_data layout; | ||
| 212 | }; | 219 | }; |
| 213 | 220 | ||
| 214 | struct nfs4_layoutget_res { | 221 | struct nfs4_layoutget_res { |
| @@ -216,8 +223,8 @@ struct nfs4_layoutget_res { | |||
| 216 | struct pnfs_layout_range range; | 223 | struct pnfs_layout_range range; |
| 217 | __u32 type; | 224 | __u32 type; |
| 218 | nfs4_stateid stateid; | 225 | nfs4_stateid stateid; |
| 219 | struct nfs4_layoutdriver_data layout; | ||
| 220 | struct nfs4_sequence_res seq_res; | 226 | struct nfs4_sequence_res seq_res; |
| 227 | struct nfs4_layoutdriver_data *layoutp; | ||
| 221 | }; | 228 | }; |
| 222 | 229 | ||
| 223 | struct nfs4_layoutget { | 230 | struct nfs4_layoutget { |
| @@ -236,6 +243,29 @@ struct nfs4_getdeviceinfo_res { | |||
| 236 | struct nfs4_sequence_res seq_res; | 243 | struct nfs4_sequence_res seq_res; |
| 237 | }; | 244 | }; |
| 238 | |||
