aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-07 17:02:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-07 17:02:24 -0400
commit4e4adb2f462889b9eac736dd06d60658beb091b6 (patch)
tree3582dab57d97bbb30add005b3b2f8a8d8412121e /include/linux/sunrpc
parent77a78806c7df8d414c33031a1ca5121876910c4f (diff)
parent5445b1fbd123420bffed5e629a420aa2a16bf849 (diff)
Merge tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Highlights include: Stable patches: - Fix atomicity of pNFS commit list updates - Fix NFSv4 handling of open(O_CREAT|O_EXCL|O_RDONLY) - nfs_set_pgio_error sometimes misses errors - Fix a thinko in xs_connect() - Fix borkage in _same_data_server_addrs_locked() - Fix a NULL pointer dereference of migration recovery ops for v4.2 client - Don't let the ctime override attribute barriers. - Revert "NFSv4: Remove incorrect check in can_open_delegated()" - Ensure flexfiles pNFS driver updates the inode after write finishes - flexfiles must not pollute the attribute cache with attrbutes from the DS - Fix a protocol error in layoutreturn - Fix a protocol issue with NFSv4.1 CLOSE stateids Bugfixes + cleanups - pNFS blocks bugfixes from Christoph - Various cleanups from Anna - More fixes for delegation corner cases - Don't fsync twice for O_SYNC/IS_SYNC files - Fix pNFS and flexfiles layoutstats bugs - pnfs/flexfiles: avoid duplicate tracking of mirror data - pnfs: Fix layoutget/layoutreturn/return-on-close serialisation issues - pnfs/flexfiles: error handling retries a layoutget before fallback to MDS Features: - Full support for the OPEN NFS4_CREATE_EXCLUSIVE4_1 mode from Kinglong - More RDMA client transport improvements from Chuck - Removal of the deprecated ib_reg_phys_mr() and ib_rereg_phys_mr() verbs from the SUNRPC, Lustre and core infiniband tree. - Optimise away the close-to-open getattr if there is no cached data" * tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (108 commits) NFSv4: Respect the server imposed limit on how many changes we may cache NFSv4: Express delegation limit in units of pages Revert "NFS: Make close(2) asynchronous when closing NFS O_DIRECT files" NFS: Optimise away the close-to-open getattr if there is no cached data NFSv4.1/flexfiles: Clean up ff_layout_write_done_cb/ff_layout_commit_done_cb NFSv4.1/flexfiles: Mark the layout for return in ff_layout_io_track_ds_error() nfs: Remove unneeded checking of the return value from scnprintf nfs: Fix truncated client owner id without proto type NFSv4.1/flexfiles: Mark layout for return if the mirrors are invalid NFSv4.1/flexfiles: RW layouts are valid only if all mirrors are valid NFSv4.1/flexfiles: Fix incorrect usage of pnfs_generic_mark_devid_invalid() NFSv4.1/flexfiles: Fix freeing of mirrors NFSv4.1/pNFS: Don't request a minimal read layout beyond the end of file NFSv4.1/pnfs: Handle LAYOUTGET return values correctly NFSv4.1/pnfs: Don't ask for a read layout for an empty file. NFSv4.1: Fix a protocol issue with CLOSE stateids NFSv4.1/flexfiles: Don't mark the entire deviceid as bad for file errors SUNRPC: Prevent SYN+SYNACK+RST storms SUNRPC: xs_reset_transport must mark the connection as disconnected NFSv4.1/pnfs: Ensure layoutreturn reserves space for the opaque payload ...
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/addr.h27
-rw-r--r--include/linux/sunrpc/auth.h8
-rw-r--r--include/linux/sunrpc/xprtrdma.h2
3 files changed, 27 insertions, 10 deletions
diff --git a/include/linux/sunrpc/addr.h b/include/linux/sunrpc/addr.h
index 07d8e53bedfc..5c9c6cd08d3b 100644
--- a/include/linux/sunrpc/addr.h
+++ b/include/linux/sunrpc/addr.h
@@ -46,8 +46,8 @@ static inline void rpc_set_port(struct sockaddr *sap,
46#define IPV6_SCOPE_DELIMITER '%' 46#define IPV6_SCOPE_DELIMITER '%'
47#define IPV6_SCOPE_ID_LEN sizeof("%nnnnnnnnnn") 47#define IPV6_SCOPE_ID_LEN sizeof("%nnnnnnnnnn")
48 48
49static inline bool __rpc_cmp_addr4(const struct sockaddr *sap1, 49static inline bool rpc_cmp_addr4(const struct sockaddr *sap1,
50 const struct sockaddr *sap2) 50 const struct sockaddr *sap2)
51{ 51{
52 const struct sockaddr_in *sin1 = (const struct sockaddr_in *)sap1; 52 const struct sockaddr_in *sin1 = (const struct sockaddr_in *)sap1;
53 const struct sockaddr_in *sin2 = (const struct sockaddr_in *)sap2; 53 const struct sockaddr_in *sin2 = (const struct sockaddr_in *)sap2;
@@ -67,8 +67,8 @@ static inline bool __rpc_copy_addr4(struct sockaddr *dst,
67} 67}
68 68
69#if IS_ENABLED(CONFIG_IPV6) 69#if IS_ENABLED(CONFIG_IPV6)
70static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1, 70static inline bool rpc_cmp_addr6(const struct sockaddr *sap1,
71 const struct sockaddr *sap2) 71 const struct sockaddr *sap2)
72{ 72{
73 const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sap1; 73 const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sap1;
74 const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; 74 const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2;
@@ -93,7 +93,7 @@ static inline bool __rpc_copy_addr6(struct sockaddr *dst,
93 return true; 93 return true;
94} 94}
95#else /* !(IS_ENABLED(CONFIG_IPV6) */ 95#else /* !(IS_ENABLED(CONFIG_IPV6) */
96static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1, 96static inline bool rpc_cmp_addr6(const struct sockaddr *sap1,
97 const struct sockaddr *sap2) 97 const struct sockaddr *sap2)
98{ 98{
99 return false; 99 return false;
@@ -122,15 +122,28 @@ static inline bool rpc_cmp_addr(const struct sockaddr *sap1,
122 if (sap1->sa_family == sap2->sa_family) { 122 if (sap1->sa_family == sap2->sa_family) {
123 switch (sap1->sa_family) { 123 switch (sap1->sa_family) {
124 case AF_INET: 124 case AF_INET:
125 return __rpc_cmp_addr4(sap1, sap2); 125 return rpc_cmp_addr4(sap1, sap2);
126 case AF_INET6: 126 case AF_INET6:
127 return __rpc_cmp_addr6(sap1, sap2); 127 return rpc_cmp_addr6(sap1, sap2);
128 } 128 }
129 } 129 }
130 return false; 130 return false;
131} 131}
132 132
133/** 133/**
134 * rpc_cmp_addr_port - compare the address and port number of two sockaddrs.
135 * @sap1: first sockaddr
136 * @sap2: second sockaddr
137 */
138static inline bool rpc_cmp_addr_port(const struct sockaddr *sap1,
139 const struct sockaddr *sap2)
140{
141 if (!rpc_cmp_addr(sap1, sap2))
142 return false;
143 return rpc_get_port(sap1) == rpc_get_port(sap2);
144}
145
146/**
134 * rpc_copy_addr - copy the address portion of one sockaddr to another 147 * rpc_copy_addr - copy the address portion of one sockaddr to another
135 * @dst: destination sockaddr 148 * @dst: destination sockaddr
136 * @src: source sockaddr 149 * @src: source sockaddr
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index a7cbb570cc5c..1ecf13e148b8 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -18,9 +18,13 @@
18#include <linux/atomic.h> 18#include <linux/atomic.h>
19#include <linux/rcupdate.h> 19#include <linux/rcupdate.h>
20#include <linux/uidgid.h> 20#include <linux/uidgid.h>
21#include <linux/utsname.h>
21 22
22/* size of the nodename buffer */ 23/*
23#define UNX_MAXNODENAME 32 24 * Size of the nodename buffer. RFC1831 specifies a hard limit of 255 bytes,
25 * but Linux hostnames are actually limited to __NEW_UTS_LEN bytes.
26 */
27#define UNX_MAXNODENAME __NEW_UTS_LEN
24 28
25struct rpcsec_gss_info; 29struct rpcsec_gss_info;
26 30
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h
index b17613052cc3..b7b279b54504 100644
--- a/include/linux/sunrpc/xprtrdma.h
+++ b/include/linux/sunrpc/xprtrdma.h
@@ -49,7 +49,7 @@
49 * a single chunk type per message is supported currently. 49 * a single chunk type per message is supported currently.
50 */ 50 */
51#define RPCRDMA_MIN_SLOT_TABLE (2U) 51#define RPCRDMA_MIN_SLOT_TABLE (2U)
52#define RPCRDMA_DEF_SLOT_TABLE (32U) 52#define RPCRDMA_DEF_SLOT_TABLE (128U)
53#define RPCRDMA_MAX_SLOT_TABLE (256U) 53#define RPCRDMA_MAX_SLOT_TABLE (256U)
54 54
55#define RPCRDMA_DEF_INLINE (1024) /* default inline max */ 55#define RPCRDMA_DEF_INLINE (1024) /* default inline max */