diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:14:54 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:14:54 -0500 |
| commit | 6f83e5bd3e96228ee0caff0b103addb5f4e95459 (patch) | |
| tree | bf27fcc754ea8c5287088df2803edbfb3c70f716 /include/linux | |
| parent | 73b4f63aebd6d57db4ca1d31fa6f8516651207b0 (diff) | |
| parent | c627d31ba0696cbd829437af2be2f2dee3546b1e (diff) | |
Merge tag 'nfs-for-3.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights incluse:
Features:
- Removing the forced serialisation of open()/close() calls in
NFSv4.x (x>0) makes for a significant performance improvement in
metadata intensive workloads.
- Full support for the pNFS "flexible files" layout type
- Further RPC/RDMA client improvements from Chuck
Bugfixes:
- Stable fix: NFSv4.1 backchannel calls blocking operations with !TASK_RUNNING
- Stable fix: pnfs_generic_pg_init_read/write can be called with lseg == NULL
- Stable fix: Fix an Oopsable condition when nsm_mon_unmon is called
as part of the namespace cleanup,
- Stable fix: Ensure we reference the inode for return-on-close in
delegreturn
- Use SO_REUSEPORT to ensure that NFSv3 TCP connections can rebind to
the same source address/port combination during a disconnect/
reconnect event. This is a requirement imposed by most NFSv3
server duplicate reply cache implementations.
Optimisations:
- Ask for no NFSv4.1 delegations on OPEN if using O_DIRECT
Other:
- Add Anna Schumaker as co-maintainer for the NFS client"
* tag 'nfs-for-3.20-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (119 commits)
SUNRPC: Cleanup to remove xs_tcp_close()
pnfs: delete an unintended goto
pnfs/flexfiles: Do not dprintk after the free
SUNRPC: Fix stupid typo in xs_sock_set_reuseport
SUNRPC: Define xs_tcp_fin_timeout only if CONFIG_SUNRPC_DEBUG
SUNRPC: Handle connection reset more efficiently.
SUNRPC: Remove the redundant XPRT_CONNECTION_CLOSE flag
SUNRPC: Make xs_tcp_close() do a socket shutdown rather than a sock_release
SUNRPC: Ensure xs_tcp_shutdown() requests a full close of the connection
SUNRPC: Cleanup to remove remaining uses of XPRT_CONNECTION_ABORT
SUNRPC: Remove TCP socket linger code
SUNRPC: Remove TCP client connection reset hack
SUNRPC: TCP/UDP always close the old socket before reconnecting
SUNRPC: Add helpers to prevent socket create from racing
SUNRPC: Ensure xs_reset_transport() resets the close connection flags
SUNRPC: Do not clear the source port in xs_reset_transport
SUNRPC: Handle EADDRINUSE on connect
SUNRPC: Set SO_REUSEPORT socket option for TCP connections
NFSv4.1: Fix pnfs_put_lseg races
NFSv4.1: pnfs_send_layoutreturn should use GFP_NOFS
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs_sb.h | 9 | ||||
| -rw-r--r-- | include/linux/nfs_idmap.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 22 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 19 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 3 | ||||
| -rw-r--r-- | include/linux/sunrpc/metrics.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/rpc_rdma.h | 14 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 6 |
10 files changed, 63 insertions, 19 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 022b761dbf0a..de7c91ca427e 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -516,6 +516,7 @@ enum pnfs_layouttype { | |||
| 516 | LAYOUT_NFSV4_1_FILES = 1, | 516 | LAYOUT_NFSV4_1_FILES = 1, |
| 517 | LAYOUT_OSD2_OBJECTS = 2, | 517 | LAYOUT_OSD2_OBJECTS = 2, |
| 518 | LAYOUT_BLOCK_VOLUME = 3, | 518 | LAYOUT_BLOCK_VOLUME = 3, |
| 519 | LAYOUT_FLEX_FILES = 4, | ||
| 519 | }; | 520 | }; |
| 520 | 521 | ||
| 521 | /* used for both layout return and recall */ | 522 | /* used for both layout return and recall */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index ddea982355f3..5e1273d4de14 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -77,10 +77,6 @@ struct nfs_client { | |||
| 77 | /* Client owner identifier */ | 77 | /* Client owner identifier */ |
| 78 | const char * cl_owner_id; | 78 | const char * cl_owner_id; |
| 79 | 79 | ||
| 80 | /* Our own IP address, as a null-terminated string. | ||
| 81 | * This is used to generate the mv0 callback address. | ||
| 82 | */ | ||
| 83 | char cl_ipaddr[48]; | ||
| 84 | u32 cl_cb_ident; /* v4.0 callback identifier */ | 80 | u32 cl_cb_ident; /* v4.0 callback identifier */ |
| 85 | const struct nfs4_minor_version_ops *cl_mvops; | 81 | const struct nfs4_minor_version_ops *cl_mvops; |
| 86 | unsigned long cl_mig_gen; | 82 | unsigned long cl_mig_gen; |
| @@ -108,6 +104,11 @@ struct nfs_client { | |||
| 108 | #define NFS_SP4_MACH_CRED_COMMIT 6 /* COMMIT */ | 104 | #define NFS_SP4_MACH_CRED_COMMIT 6 /* COMMIT */ |
| 109 | #endif /* CONFIG_NFS_V4 */ | 105 | #endif /* CONFIG_NFS_V4 */ |
| 110 | 106 | ||
| 107 | /* Our own IP address, as a null-terminated string. | ||
| 108 | * This is used to generate the mv0 callback address. | ||
| 109 | */ | ||
| 110 | char cl_ipaddr[48]; | ||
| 111 | |||
| 111 | #ifdef CONFIG_NFS_FSCACHE | 112 | #ifdef CONFIG_NFS_FSCACHE |
| 112 | struct fscache_cookie *fscache; /* client index cache cookie */ | 113 | struct fscache_cookie *fscache; /* client index cache cookie */ |
| 113 | #endif | 114 | #endif |
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 0f4b79da6584..333844e38f66 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
| @@ -73,5 +73,7 @@ int nfs_map_group_to_gid(const struct nfs_server *, const char *, size_t, kgid_t | |||
| 73 | int nfs_map_uid_to_name(const struct nfs_server *, kuid_t, char *, size_t); | 73 | int nfs_map_uid_to_name(const struct nfs_server *, kuid_t, char *, size_t); |
| 74 | int nfs_map_gid_to_group(const struct nfs_server *, kgid_t, char *, size_t); | 74 | int nfs_map_gid_to_group(const struct nfs_server *, kgid_t, char *, size_t); |
| 75 | 75 | ||
| 76 | int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res); | ||
| 77 | |||
| 76 | extern unsigned int nfs_idmap_cache_timeout; | 78 | extern unsigned int nfs_idmap_cache_timeout; |
| 77 | #endif /* NFS_IDMAP_H */ | 79 | #endif /* NFS_IDMAP_H */ |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 6c3e06ee2fb7..3eb072dbce83 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -58,6 +58,9 @@ struct nfs_pageio_ops { | |||
| 58 | size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, | 58 | size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, |
| 59 | struct nfs_page *); | 59 | struct nfs_page *); |
| 60 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 60 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
| 61 | unsigned int (*pg_get_mirror_count)(struct nfs_pageio_descriptor *, | ||
| 62 | struct nfs_page *); | ||
| 63 | void (*pg_cleanup)(struct nfs_pageio_descriptor *); | ||
| 61 | }; | 64 | }; |
| 62 | 65 | ||
| 63 | struct nfs_rw_ops { | 66 | struct nfs_rw_ops { |
| @@ -69,18 +72,21 @@ struct nfs_rw_ops { | |||
| 69 | struct inode *); | 72 | struct inode *); |
| 70 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); | 73 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); |
| 71 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, | 74 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, |
| 75 | const struct nfs_rpc_ops *, | ||
| 72 | struct rpc_task_setup *, int); | 76 | struct rpc_task_setup *, int); |
| 73 | }; | 77 | }; |
| 74 | 78 | ||
| 75 | struct nfs_pageio_descriptor { | 79 | struct nfs_pgio_mirror { |
| 76 | struct list_head pg_list; | 80 | struct list_head pg_list; |
| 77 | unsigned long pg_bytes_written; | 81 | unsigned long pg_bytes_written; |
| 78 | size_t pg_count; | 82 | size_t pg_count; |
| 79 | size_t pg_bsize; | 83 | size_t pg_bsize; |
| 80 | unsigned int pg_base; | 84 | unsigned int pg_base; |
| 81 | unsigned char pg_moreio : 1, | 85 | unsigned char pg_recoalesce : 1; |
| 82 | pg_recoalesce : 1; | 86 | }; |
| 83 | 87 | ||
| 88 | struct nfs_pageio_descriptor { | ||
| 89 | unsigned char pg_moreio : 1; | ||
| 84 | struct inode *pg_inode; | 90 | struct inode *pg_inode; |
| 85 | const struct nfs_pageio_ops *pg_ops; | 91 | const struct nfs_pageio_ops *pg_ops; |
| 86 | const struct nfs_rw_ops *pg_rw_ops; | 92 | const struct nfs_rw_ops *pg_rw_ops; |
| @@ -91,8 +97,18 @@ struct nfs_pageio_descriptor { | |||
| 91 | struct pnfs_layout_segment *pg_lseg; | 97 | struct pnfs_layout_segment *pg_lseg; |
| 92 | struct nfs_direct_req *pg_dreq; | 98 | struct nfs_direct_req *pg_dreq; |
| 93 | void *pg_layout_private; | 99 | void *pg_layout_private; |
| 100 | unsigned int pg_bsize; /* default bsize for mirrors */ | ||
| 101 | |||
| 102 | u32 pg_mirror_count; | ||
| 103 | struct nfs_pgio_mirror *pg_mirrors; | ||
| 104 | struct nfs_pgio_mirror pg_mirrors_static[1]; | ||
| 105 | struct nfs_pgio_mirror *pg_mirrors_dynamic; | ||
| 106 | u32 pg_mirror_idx; /* current mirror */ | ||
| 94 | }; | 107 | }; |
| 95 | 108 | ||
| 109 | /* arbitrarily selected limit to number of mirrors */ | ||
| 110 | #define NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX 16 | ||
| 111 | |||
| 96 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 112 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
| 97 | 113 | ||
| 98 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | 114 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 467c84efb596..38d96ba935c2 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -285,6 +285,7 @@ struct nfs4_layoutcommit_data { | |||
| 285 | struct nfs_fattr fattr; | 285 | struct nfs_fattr fattr; |
| 286 | struct list_head lseg_list; | 286 | struct list_head lseg_list; |
| 287 | struct rpc_cred *cred; | 287 | struct rpc_cred *cred; |
| 288 | struct inode *inode; | ||
| 288 | struct nfs4_layoutcommit_args args; | 289 | struct nfs4_layoutcommit_args args; |
| 289 | struct nfs4_layoutcommit_res res; | 290 | struct nfs4_layoutcommit_res res; |
| 290 | }; | 291 | }; |
| @@ -293,6 +294,7 @@ struct nfs4_layoutreturn_args { | |||
| 293 | struct nfs4_sequence_args seq_args; | 294 | struct nfs4_sequence_args seq_args; |
| 294 | struct pnfs_layout_hdr *layout; | 295 | struct pnfs_layout_hdr *layout; |
| 295 | struct inode *inode; | 296 | struct inode *inode; |
| 297 | struct pnfs_layout_range range; | ||
| 296 | nfs4_stateid stateid; | 298 | nfs4_stateid stateid; |
| 297 | __u32 layout_type; | 299 | __u32 layout_type; |
| 298 | }; | 300 | }; |
| @@ -308,6 +310,7 @@ struct nfs4_layoutreturn { | |||
| 308 | struct nfs4_layoutreturn_res res; | 310 | struct nfs4_layoutreturn_res res; |
| 309 | struct rpc_cred *cred; | 311 | struct rpc_cred *cred; |
| 310 | struct nfs_client *clp; | 312 | struct nfs_client *clp; |
| 313 | struct inode *inode; | ||
| 311 | int rpc_status; | 314 | int rpc_status; |
| 312 | }; | 315 | }; |
| 313 | 316 | ||
| @@ -325,6 +328,7 @@ struct nfs_openargs { | |||
| 325 | struct nfs_seqid * seqid; | 328 | struct nfs_seqid * seqid; |
| 326 | int open_flags; | 329 | int open_flags; |
| 327 | fmode_t fmode; | 330 | fmode_t fmode; |
| 331 | u32 share_access; | ||
| 328 | u32 access; | 332 | u32 access; |
| 329 | __u64 clientid; | 333 | __u64 clientid; |
| 330 | struct stateowner_id id; | 334 | struct stateowner_id id; |
| @@ -389,9 +393,10 @@ struct nfs_open_confirmres { | |||
| 389 | struct nfs_closeargs { | 393 | struct nfs_closeargs { |
| 390 | struct nfs4_sequence_args seq_args; | 394 | struct nfs4_sequence_args seq_args; |
| 391 | struct nfs_fh * fh; | 395 | struct nfs_fh * fh; |
| 392 | nfs4_stateid * stateid; | 396 | nfs4_stateid stateid; |
| 393 | struct nfs_seqid * seqid; | 397 | struct nfs_seqid * seqid; |
| 394 | fmode_t fmode; | 398 | fmode_t fmode; |
| 399 | u32 share_access; | ||
| 395 | const u32 * bitmask; | 400 | const u32 * bitmask; |
| 396 | }; | 401 | }; |
| 397 | 402 | ||
| @@ -416,12 +421,13 @@ struct nfs_lock_args { | |||
| 416 | struct nfs_fh * fh; | 421 | struct nfs_fh * fh; |
| 417 | struct file_lock * fl; | 422 | struct file_lock * fl; |
| 418 | struct nfs_seqid * lock_seqid; | 423 | struct nfs_seqid * lock_seqid; |
| 419 | nfs4_stateid * lock_stateid; | 424 | nfs4_stateid lock_stateid; |
| 420 | struct nfs_seqid * open_seqid; | 425 | struct nfs_seqid * open_seqid; |
| 421 | nfs4_stateid * open_stateid; | 426 | nfs4_stateid open_stateid; |
| 422 | struct nfs_lowner lock_owner; | 427 | struct nfs_lowner lock_owner; |
| 423 | unsigned char block : 1; | 428 | unsigned char block : 1; |
| 424 | unsigned char reclaim : 1; | 429 | unsigned char reclaim : 1; |
| 430 | unsigned char new_lock : 1; | ||
| 425 | unsigned char new_lock_owner : 1; | 431 | unsigned char new_lock_owner : 1; |
| 426 | }; | 432 | }; |
| 427 | 433 | ||
| @@ -437,7 +443,7 @@ struct nfs_locku_args { | |||
| 437 | struct nfs_fh * fh; | 443 | struct nfs_fh * fh; |
| 438 | struct file_lock * fl; | 444 | struct file_lock * fl; |
| 439 | struct nfs_seqid * seqid; | 445 | struct nfs_seqid * seqid; |
| 440 | nfs4_stateid * stateid; | 446 | nfs4_stateid stateid; |
| 441 | }; | 447 | }; |
| 442 | 448 | ||
| 443 | struct nfs_locku_res { | 449 | struct nfs_locku_res { |
| @@ -513,6 +519,7 @@ struct nfs_pgio_res { | |||
| 513 | struct nfs4_sequence_res seq_res; | 519 | struct nfs4_sequence_res seq_res; |
| 514 | struct nfs_fattr * fattr; | 520 | struct nfs_fattr * fattr; |
| 515 | __u32 count; | 521 | __u32 count; |
| 522 | __u32 op_status; | ||
| 516 | int eof; /* used by read */ | 523 | int eof; /* used by read */ |
| 517 | struct nfs_writeverf * verf; /* used by write */ | 524 | struct nfs_writeverf * verf; /* used by write */ |
| 518 | const struct nfs_server *server; /* used by write */ | 525 | const struct nfs_server *server; /* used by write */ |
| @@ -532,6 +539,7 @@ struct nfs_commitargs { | |||
| 532 | 539 | ||
| 533 | struct nfs_commitres { | 540 | struct nfs_commitres { |
| 534 | struct nfs4_sequence_res seq_res; | 541 | struct nfs4_sequence_res seq_res; |
| 542 | __u32 op_status; | ||
| 535 | struct nfs_fattr *fattr; | 543 | struct nfs_fattr *fattr; |
| 536 | struct nfs_writeverf *verf; | 544 | struct nfs_writeverf *verf; |
| 537 | const struct nfs_server *server; | 545 | const struct nfs_server *server; |
| @@ -1325,7 +1333,8 @@ struct nfs_pgio_header { | |||
| 1325 | __u64 mds_offset; /* Filelayout dense stripe */ | 1333 | __u64 mds_offset; /* Filelayout dense stripe */ |
| 1326 | struct nfs_page_array page_array; | 1334 | struct nfs_page_array page_array; |
| 1327 | struct nfs_client *ds_clp; /* pNFS data server */ | 1335 | struct nfs_client *ds_clp; /* pNFS data server */ |
| 1328 | int ds_idx; /* ds index if ds_clp is set */ | 1336 | int ds_commit_idx; /* ds index if ds_clp is set */ |
| 1337 | int pgio_mirror_idx;/* mirror index in pgio layer */ | ||
| 1329 | }; | 1338 | }; |
| 1330 | 1339 | ||
| 1331 | struct nfs_mds_commit_info { | 1340 | struct nfs_mds_commit_info { |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index d86acc63b25f..598ba80ec30c 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -57,7 +57,7 @@ struct rpc_clnt { | |||
| 57 | const struct rpc_timeout *cl_timeout; /* Timeout strategy */ | 57 | const struct rpc_timeout *cl_timeout; /* Timeout strategy */ |
| 58 | 58 | ||
| 59 | int cl_nodelen; /* nodename length */ | 59 | int cl_nodelen; /* nodename length */ |
| 60 | char cl_nodename[UNX_MAXNODENAME]; | 60 | char cl_nodename[UNX_MAXNODENAME+1]; |
| 61 | struct rpc_pipe_dir_head cl_pipedir_objects; | 61 | struct rpc_pipe_dir_head cl_pipedir_objects; |
| 62 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ | 62 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ |
| 63 | struct rpc_rtt cl_rtt_default; | 63 | struct rpc_rtt cl_rtt_default; |
| @@ -112,6 +112,7 @@ struct rpc_create_args { | |||
| 112 | struct sockaddr *saddress; | 112 | struct sockaddr *saddress; |
| 113 | const struct rpc_timeout *timeout; | 113 | const struct rpc_timeout *timeout; |
| 114 | const char *servername; | 114 | const char *servername; |
| 115 | const char *nodename; | ||
| 115 | const struct rpc_program *program; | 116 | const struct rpc_program *program; |
| 116 | u32 prognumber; /* overrides program->number */ | 117 | u32 prognumber; /* overrides program->number */ |
| 117 | u32 version; | 118 | u32 version; |
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index eecb5a71e6c0..7e61a17030a4 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
| @@ -79,6 +79,8 @@ struct rpc_clnt; | |||
| 79 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); | 79 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); |
| 80 | void rpc_count_iostats(const struct rpc_task *, | 80 | void rpc_count_iostats(const struct rpc_task *, |
| 81 | struct rpc_iostats *); | 81 | struct rpc_iostats *); |
| 82 | void rpc_count_iostats_metrics(const struct rpc_task *, | ||
| 83 | struct rpc_iostats *); | ||
| 82 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); | 84 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); |
| 83 | void rpc_free_iostats(struct rpc_iostats *); | 85 | void rpc_free_iostats(struct rpc_iostats *); |
| 84 | 86 | ||
| @@ -87,6 +89,8 @@ void rpc_free_iostats(struct rpc_iostats *); | |||
| 87 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } | 89 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } |
| 88 | static inline void rpc_count_iostats(const struct rpc_task *task, | 90 | static inline void rpc_count_iostats(const struct rpc_task *task, |
| 89 | struct rpc_iostats *stats) {} | 91 | struct rpc_iostats *stats) {} |
| 92 | static inline void rpc_count_iostats_metrics(const struct rpc_task *, | ||
| 93 | struct rpc_iostats *) {} | ||
| 90 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} | 94 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} |
| 91 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} | 95 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} |
| 92 | 96 | ||
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index b78f16b1dea3..f33c5a4d6fe4 100644 --- a/include/linux/sunrpc/rpc_rdma.h +++ b/include/linux/sunrpc/rpc_rdma.h | |||
| @@ -42,6 +42,9 @@ | |||
| 42 | 42 | ||
| 43 | #include <linux/types.h> | 43 | #include <linux/types.h> |
| 44 | 44 | ||
| 45 | #define RPCRDMA_VERSION 1 | ||
| 46 | #define rpcrdma_version cpu_to_be32(RPCRDMA_VERSION) | ||
| 47 | |||
| 45 | struct rpcrdma_segment { | 48 | struct rpcrdma_segment { |
| 46 | __be32 rs_handle; /* Registered memory handle */ | 49 | __be32 rs_handle; /* Registered memory handle */ |
| 47 | __be32 rs_length; /* Length of the chunk in bytes */ | 50 | __be32 rs_length; /* Length of the chunk in bytes */ |
| @@ -95,7 +98,10 @@ struct rpcrdma_msg { | |||
| 95 | } rm_body; | 98 | } rm_body; |
| 96 | }; | 99 | }; |
| 97 | 100 | ||
| 98 | #define RPCRDMA_HDRLEN_MIN 28 | 101 | /* |
| 102 | * Smallest RPC/RDMA header: rm_xid through rm_type, then rm_nochunks | ||
| 103 | */ | ||
| 104 | #define RPCRDMA_HDRLEN_MIN (sizeof(__be32) * 7) | ||
| 99 | 105 | ||
| 100 | enum rpcrdma_errcode { | 106 | enum rpcrdma_errcode { |
| 101 | ERR_VERS = 1, | 107 | ERR_VERS = 1, |
| @@ -115,4 +121,10 @@ enum rpcrdma_proc { | |||
| 115 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ | 121 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ |
| 116 | }; | 122 | }; |
| 117 | 123 | ||
| 124 | #define rdma_msg cpu_to_be32(RDMA_MSG) | ||
| 125 | #define rdma_nomsg cpu_to_be32(RDMA_NOMSG) | ||
| 126 | #define rdma_msgp cpu_to_be32(RDMA_MSGP) | ||
| 127 | #define rdma_done cpu_to_be32(RDMA_DONE) | ||
| 128 | #define rdma_error cpu_to_be32(RDMA_ERROR) | ||
| 129 | |||
| 118 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ | 130 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 975da754c778..ddfe88f52219 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
| @@ -63,8 +63,6 @@ extern atomic_t rdma_stat_rq_prod; | |||
| 63 | extern atomic_t rdma_stat_sq_poll; | 63 | extern atomic_t rdma_stat_sq_poll; |
| 64 | extern atomic_t rdma_stat_sq_prod; | 64 | extern atomic_t rdma_stat_sq_prod; |
| 65 | 65 | ||
| 66 | #define RPCRDMA_VERSION 1 | ||
| 67 | |||
| 68 | /* | 66 | /* |
| 69 | * Contexts are built when an RDMA request is created and are a | 67 | * Contexts are built when an RDMA request is created and are a |
| 70 | * record of the resources that can be recovered when the request | 68 | * record of the resources that can be recovered when the request |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 9d27ac45b909..8b93ef53df3c 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -347,6 +347,9 @@ void xprt_force_disconnect(struct rpc_xprt *xprt); | |||
| 347 | void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | 347 | void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); |
| 348 | int xs_swapper(struct rpc_xprt *xprt, int enable); | 348 | int xs_swapper(struct rpc_xprt *xprt, int enable); |
| 349 | 349 | ||
| 350 | bool xprt_lock_connect(struct rpc_xprt *, struct rpc_task *, void *); | ||
| 351 | void xprt_unlock_connect(struct rpc_xprt *, void *); | ||
| 352 | |||
| 350 | /* | 353 | /* |
| 351 | * Reserved bit positions in xprt->state | 354 | * Reserved bit positions in xprt->state |
| 352 | */ | 355 | */ |
| @@ -357,10 +360,7 @@ int xs_swapper(struct rpc_xprt *xprt, int enable); | |||
| 357 | #define XPRT_BOUND (4) | 360 | #define XPRT_BOUND (4) |
| 358 | #define XPRT_BINDING (5) | 361 | #define XPRT_BINDING (5) |
| 359 | #define XPRT_CLOSING (6) | 362 | #define XPRT_CLOSING (6) |
| 360 | #define XPRT_CONNECTION_ABORT (7) | ||
| 361 | #define XPRT_CONNECTION_CLOSE (8) | ||
| 362 | #define XPRT_CONGESTED (9) | 363 | #define XPRT_CONGESTED (9) |
| 363 | #define XPRT_CONNECTION_REUSE (10) | ||
| 364 | 364 | ||
| 365 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 365 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
| 366 | { | 366 | { |
