aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:33:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:33:59 -0400
commit59953fba87e5e535657403cc6439d24187929559 (patch)
tree4f92cc3bcacf052cb3fb895512af5a7d3dad86cb /include
parent9ec3a646fe09970f801ab15e0f1694060b9f19af (diff)
parentf139b6c676c7e49b66016b28bf3f8ec5c54be891 (diff)
Merge tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Another set of mainly bugfixes and a couple of cleanups. No new functionality in this round. Highlights include: Stable patches: - Fix a regression in /proc/self/mountstats - Fix the pNFS flexfiles O_DIRECT support - Fix high load average due to callback thread sleeping Bugfixes: - Various patches to fix the pNFS layoutcommit support - Do not cache pNFS deviceids unless server notifications are enabled - Fix a SUNRPC transport reconnection regression - make debugfs file creation failure non-fatal in SUNRPC - Another fix for circular directory warnings on NFSv4 "junctioned" mountpoints - Fix locking around NFSv4.2 fallocate() support - Truncating NFSv4 file opens should also sync O_DIRECT writes - Prevent infinite loop in rpcrdma_ep_create() Features: - Various improvements to the RDMA transport code's handling of memory registration - Various code cleanups" * tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (55 commits) fs/nfs: fix new compiler warning about boolean in switch nfs: Remove unneeded casts in nfs NFS: Don't attempt to decode missing directory entries Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one" NFS: Rename idmap.c to nfs4idmap.c NFS: Move nfs_idmap.h into fs/nfs/ NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h NFS: Add a stub for GETDEVICELIST nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes nfs: fix DIO good bytes calculation nfs: Fetch MOUNTED_ON_FILEID when updating an inode sunrpc: make debugfs file creation failure non-fatal nfs: fix high load average due to callback thread sleeping NFS: Reduce time spent holding the i_mutex during fallocate() NFS: Don't zap caches on fallocate() xprtrdma: Make rpcrdma_{un}map_one() into inline functions xprtrdma: Handle non-SEND completions via a callout xprtrdma: Add "open" memreg op xprtrdma: Add "destroy MRs" memreg op xprtrdma: Add "reset MRs" memreg op ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/nfs_idmap.h79
-rw-r--r--include/linux/nfs_xdr.h6
-rw-r--r--include/linux/sunrpc/msg_prot.h8
-rw-r--r--include/linux/sunrpc/xprtrdma.h5
-rw-r--r--include/uapi/linux/nfs_idmap.h2
6 files changed, 15 insertions, 86 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 410abd172feb..b95f914ce083 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -511,6 +511,7 @@ extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned
511 * Try to write back everything synchronously (but check the 511 * Try to write back everything synchronously (but check the
512 * return value!) 512 * return value!)
513 */ 513 */
514extern int nfs_sync_inode(struct inode *inode);
514extern int nfs_wb_all(struct inode *inode); 515extern int nfs_wb_all(struct inode *inode);
515extern int nfs_wb_page(struct inode *inode, struct page* page); 516extern int nfs_wb_page(struct inode *inode, struct page* page);
516extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); 517extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h
deleted file mode 100644
index 333844e38f66..000000000000
--- a/include/linux/nfs_idmap.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * include/linux/nfs_idmap.h
3 *
4 * UID and GID to name mapping for clients.
5 *
6 * Copyright (c) 2002 The Regents of the University of Michigan.
7 * All rights reserved.
8 *
9 * Marius Aamodt Eriksen <marius@umich.edu>
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of the University nor the names of its
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
25 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
31 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */
36#ifndef NFS_IDMAP_H
37#define NFS_IDMAP_H
38
39#include <linux/uidgid.h>
40#include <uapi/linux/nfs_idmap.h>
41
42
43/* Forward declaration to make this header independent of others */
44struct nfs_client;
45struct nfs_server;
46struct nfs_fattr;
47struct nfs4_string;
48
49#if IS_ENABLED(CONFIG_NFS_V4)
50int nfs_idmap_init(void);
51void nfs_idmap_quit(void);
52#else
53static inline int nfs_idmap_init(void)
54{
55 return 0;
56}
57
58static inline void nfs_idmap_quit(void)
59{}
60#endif
61
62int nfs_idmap_new(struct nfs_client *);
63void nfs_idmap_delete(struct nfs_client *);
64
65void nfs_fattr_init_names(struct nfs_fattr *fattr,
66 struct nfs4_string *owner_name,
67 struct nfs4_string *group_name);
68void nfs_fattr_free_names(struct nfs_fattr *);
69void nfs_fattr_map_and_free_names(struct nfs_server *, struct nfs_fattr *);
70
71int nfs_map_name_to_uid(const struct nfs_server *, const char *, size_t, kuid_t *);
72int nfs_map_group_to_gid(const struct nfs_server *, const char *, size_t, kgid_t *);
73int nfs_map_uid_to_name(const struct nfs_server *, kuid_t, char *, size_t);
74int nfs_map_gid_to_group(const struct nfs_server *, kgid_t, char *, size_t);
75
76int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res);
77
78extern unsigned int nfs_idmap_cache_timeout;
79#endif /* NFS_IDMAP_H */
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 4cb3eaa89cf7..93ab6071bbe9 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -255,11 +255,13 @@ struct nfs4_layoutget {
255struct nfs4_getdeviceinfo_args { 255struct nfs4_getdeviceinfo_args {
256 struct nfs4_sequence_args seq_args; 256 struct nfs4_sequence_args seq_args;
257 struct pnfs_device *pdev; 257 struct pnfs_device *pdev;
258 __u32 notify_types;
258}; 259};
259 260
260struct nfs4_getdeviceinfo_res { 261struct nfs4_getdeviceinfo_res {
261 struct nfs4_sequence_res seq_res; 262 struct nfs4_sequence_res seq_res;
262 struct pnfs_device *pdev; 263 struct pnfs_device *pdev;
264 __u32 notification;
263}; 265};
264 266
265struct nfs4_layoutcommit_args { 267struct nfs4_layoutcommit_args {
@@ -1271,11 +1273,15 @@ struct nfs42_falloc_args {
1271 nfs4_stateid falloc_stateid; 1273 nfs4_stateid falloc_stateid;
1272 u64 falloc_offset; 1274 u64 falloc_offset;
1273 u64 falloc_length; 1275 u64 falloc_length;
1276 const u32 *falloc_bitmask;
1274}; 1277};
1275 1278
1276struct nfs42_falloc_res { 1279struct nfs42_falloc_res {
1277 struct nfs4_sequence_res seq_res; 1280 struct nfs4_sequence_res seq_res;
1278 unsigned int status; 1281 unsigned int status;
1282
1283 struct nfs_fattr *falloc_fattr;
1284 const struct nfs_server *falloc_server;
1279}; 1285};
1280 1286
1281struct nfs42_seek_args { 1287struct nfs42_seek_args {
diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h
index aadc6a04e1ac..807371357160 100644
--- a/include/linux/sunrpc/msg_prot.h
+++ b/include/linux/sunrpc/msg_prot.h
@@ -142,12 +142,18 @@ typedef __be32 rpc_fraghdr;
142 (RPC_REPHDRSIZE + (2 + RPC_MAX_AUTH_SIZE/4)) 142 (RPC_REPHDRSIZE + (2 + RPC_MAX_AUTH_SIZE/4))
143 143
144/* 144/*
145 * RFC1833/RFC3530 rpcbind (v3+) well-known netid's. 145 * Well-known netids. See:
146 *
147 * http://www.iana.org/assignments/rpc-netids/rpc-netids.xhtml
146 */ 148 */
147#define RPCBIND_NETID_UDP "udp" 149#define RPCBIND_NETID_UDP "udp"
148#define RPCBIND_NETID_TCP "tcp" 150#define RPCBIND_NETID_TCP "tcp"
151#define RPCBIND_NETID_RDMA "rdma"
152#define RPCBIND_NETID_SCTP "sctp"
149#define RPCBIND_NETID_UDP6 "udp6" 153#define RPCBIND_NETID_UDP6 "udp6"
150#define RPCBIND_NETID_TCP6 "tcp6" 154#define RPCBIND_NETID_TCP6 "tcp6"
155#define RPCBIND_NETID_RDMA6 "rdma6"
156#define RPCBIND_NETID_SCTP6 "sctp6"
151#define RPCBIND_NETID_LOCAL "local" 157#define RPCBIND_NETID_LOCAL "local"
152 158
153/* 159/*
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h
index 64a0a0a97b23..c984c85981ea 100644
--- a/include/linux/sunrpc/xprtrdma.h
+++ b/include/linux/sunrpc/xprtrdma.h
@@ -41,11 +41,6 @@
41#define _LINUX_SUNRPC_XPRTRDMA_H 41#define _LINUX_SUNRPC_XPRTRDMA_H
42 42
43/* 43/*
44 * rpcbind (v3+) RDMA netid.
45 */
46#define RPCBIND_NETID_RDMA "rdma"
47
48/*
49 * Constants. Max RPC/NFS header is big enough to account for 44 * Constants. Max RPC/NFS header is big enough to account for
50 * additional marshaling buffers passed down by Linux client. 45 * additional marshaling buffers passed down by Linux client.
51 * 46 *
diff --git a/include/uapi/linux/nfs_idmap.h b/include/uapi/linux/nfs_idmap.h
index 8d4b1c7b24d4..038e36c96669 100644
--- a/include/uapi/linux/nfs_idmap.h
+++ b/include/uapi/linux/nfs_idmap.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/linux/nfs_idmap.h 2 * include/uapi/linux/nfs_idmap.h
3 * 3 *
4 * UID and GID to name mapping for clients. 4 * UID and GID to name mapping for clients.
5 * 5 *