aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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/debug.h18
-rw-r--r--include/uapi/linux/nfs_idmap.h2
5 files changed, 17 insertions, 89 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index b01ccf371fdc..b638eb6727c6 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -512,6 +512,7 @@ extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned
512 * Try to write back everything synchronously (but check the 512 * Try to write back everything synchronously (but check the
513 * return value!) 513 * return value!)
514 */ 514 */
515extern int nfs_sync_inode(struct inode *inode);
515extern int nfs_wb_all(struct inode *inode); 516extern int nfs_wb_all(struct inode *inode);
516extern int nfs_wb_page(struct inode *inode, struct page* page); 517extern int nfs_wb_page(struct inode *inode, struct page* page);
517extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); 518extern 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/debug.h b/include/linux/sunrpc/debug.h
index c57d8ea0716c..59a7889e15db 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -60,17 +60,17 @@ struct rpc_xprt;
60#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) 60#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
61void rpc_register_sysctl(void); 61void rpc_register_sysctl(void);
62void rpc_unregister_sysctl(void); 62void rpc_unregister_sysctl(void);
63int sunrpc_debugfs_init(void); 63void sunrpc_debugfs_init(void);
64void sunrpc_debugfs_exit(void); 64void sunrpc_debugfs_exit(void);
65int rpc_clnt_debugfs_register(struct rpc_clnt *); 65void rpc_clnt_debugfs_register(struct rpc_clnt *);
66void rpc_clnt_debugfs_unregister(struct rpc_clnt *); 66void rpc_clnt_debugfs_unregister(struct rpc_clnt *);
67int rpc_xprt_debugfs_register(struct rpc_xprt *); 67void rpc_xprt_debugfs_register(struct rpc_xprt *);
68void rpc_xprt_debugfs_unregister(struct rpc_xprt *); 68void rpc_xprt_debugfs_unregister(struct rpc_xprt *);
69#else 69#else
70static inline int 70static inline void
71sunrpc_debugfs_init(void) 71sunrpc_debugfs_init(void)
72{ 72{
73 return 0; 73 return;
74} 74}
75 75
76static inline void 76static inline void
@@ -79,10 +79,10 @@ sunrpc_debugfs_exit(void)
79 return; 79 return;
80} 80}
81 81
82static inline int 82static inline void
83rpc_clnt_debugfs_register(struct rpc_clnt *clnt) 83rpc_clnt_debugfs_register(struct rpc_clnt *clnt)
84{ 84{
85 return 0; 85 return;
86} 86}
87 87
88static inline void 88static inline void
@@ -91,10 +91,10 @@ rpc_clnt_debugfs_unregister(struct rpc_clnt *clnt)
91 return; 91 return;
92} 92}
93 93
94static inline int 94static inline void
95rpc_xprt_debugfs_register(struct rpc_xprt *xprt) 95rpc_xprt_debugfs_register(struct rpc_xprt *xprt)
96{ 96{
97 return 0; 97 return;
98} 98}
99 99
100static inline void 100static inline void
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 *