diff options
author | Anna Schumaker <Anna.Schumaker@netapp.com> | 2015-04-15 13:00:05 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-04-23 15:16:14 -0400 |
commit | 40c64c26a43494ba9982fd1b87dc54e3819566fc (patch) | |
tree | 7f5bec2402143aab9e194aa0c91071fefd7dced7 /fs | |
parent | f9ebd61855253078fe8b07bacaf516337f8078e8 (diff) |
NFS: Move nfs_idmap.h into fs/nfs/
This file is only used internally to the NFS v4 module, so it doesn't
need to be in the global include path. I also renamed it from
nfs_idmap.h to nfs4idmap.h to emphasize that it's an NFSv4-only include
file.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 2 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4client.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4idmap.h | 68 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4super.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4sysctl.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 2 |
9 files changed, 76 insertions, 8 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index f3ff66e4fb6a..7d05089e52d6 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
@@ -11,10 +11,10 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | 12 | ||
13 | #include <linux/sunrpc/metrics.h> | 13 | #include <linux/sunrpc/metrics.h> |
14 | #include <linux/nfs_idmap.h> | ||
15 | 14 | ||
16 | #include "flexfilelayout.h" | 15 | #include "flexfilelayout.h" |
17 | #include "../nfs4session.h" | 16 | #include "../nfs4session.h" |
17 | #include "../nfs4idmap.h" | ||
18 | #include "../internal.h" | 18 | #include "../internal.h" |
19 | #include "../delegation.h" | 19 | #include "../delegation.h" |
20 | #include "../nfs4trace.h" | 20 | #include "../nfs4trace.h" |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 857e2a99acc8..2e1737c40a29 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/parser.h> | 37 | #include <linux/parser.h> |
38 | #include <linux/fs.h> | 38 | #include <linux/fs.h> |
39 | #include <linux/nfs_idmap.h> | ||
40 | #include <net/net_namespace.h> | 39 | #include <net/net_namespace.h> |
41 | #include <linux/sunrpc/rpc_pipe_fs.h> | 40 | #include <linux/sunrpc/rpc_pipe_fs.h> |
42 | #include <linux/nfs_fs.h> | 41 | #include <linux/nfs_fs.h> |
@@ -49,6 +48,7 @@ | |||
49 | 48 | ||
50 | #include "internal.h" | 49 | #include "internal.h" |
51 | #include "netns.h" | 50 | #include "netns.h" |
51 | #include "nfs4idmap.h" | ||
52 | #include "nfs4trace.h" | 52 | #include "nfs4trace.h" |
53 | 53 | ||
54 | #define NFS_UINT_MAXLEN 11 | 54 | #define NFS_UINT_MAXLEN 11 |
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 86d6214ea022..43ca5a7ac1da 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/nfs_fs.h> | 6 | #include <linux/nfs_fs.h> |
7 | #include <linux/nfs_idmap.h> | ||
8 | #include <linux/nfs_mount.h> | 7 | #include <linux/nfs_mount.h> |
9 | #include <linux/sunrpc/addr.h> | 8 | #include <linux/sunrpc/addr.h> |
10 | #include <linux/sunrpc/auth.h> | 9 | #include <linux/sunrpc/auth.h> |
@@ -15,6 +14,7 @@ | |||
15 | #include "callback.h" | 14 | #include "callback.h" |
16 | #include "delegation.h" | 15 | #include "delegation.h" |
17 | #include "nfs4session.h" | 16 | #include "nfs4session.h" |
17 | #include "nfs4idmap.h" | ||
18 | #include "pnfs.h" | 18 | #include "pnfs.h" |
19 | #include "netns.h" | 19 | #include "netns.h" |
20 | 20 | ||
diff --git a/fs/nfs/nfs4idmap.h b/fs/nfs/nfs4idmap.h new file mode 100644 index 000000000000..de44d7330ab3 --- /dev/null +++ b/fs/nfs/nfs4idmap.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * fs/nfs/nfs4idmap.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 */ | ||
44 | struct nfs_client; | ||
45 | struct nfs_server; | ||
46 | struct nfs_fattr; | ||
47 | struct nfs4_string; | ||
48 | |||
49 | int nfs_idmap_init(void); | ||
50 | void nfs_idmap_quit(void); | ||
51 | int nfs_idmap_new(struct nfs_client *); | ||
52 | void nfs_idmap_delete(struct nfs_client *); | ||
53 | |||
54 | void nfs_fattr_init_names(struct nfs_fattr *fattr, | ||
55 | struct nfs4_string *owner_name, | ||
56 | struct nfs4_string *group_name); | ||
57 | void nfs_fattr_free_names(struct nfs_fattr *); | ||
58 | void nfs_fattr_map_and_free_names(struct nfs_server *, struct nfs_fattr *); | ||
59 | |||
60 | int nfs_map_name_to_uid(const struct nfs_server *, const char *, size_t, kuid_t *); | ||
61 | int nfs_map_group_to_gid(const struct nfs_server *, const char *, size_t, kgid_t *); | ||
62 | int nfs_map_uid_to_name(const struct nfs_server *, kuid_t, char *, size_t); | ||
63 | int nfs_map_gid_to_group(const struct nfs_server *, kgid_t, char *, size_t); | ||
64 | |||
65 | int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res); | ||
66 | |||
67 | extern unsigned int nfs_idmap_cache_timeout; | ||
68 | #endif /* NFS_IDMAP_H */ | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6d48f37cfe8a..60396330044f 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -51,7 +51,6 @@ | |||
51 | #include <linux/namei.h> | 51 | #include <linux/namei.h> |
52 | #include <linux/mount.h> | 52 | #include <linux/mount.h> |
53 | #include <linux/module.h> | 53 | #include <linux/module.h> |
54 | #include <linux/nfs_idmap.h> | ||
55 | #include <linux/xattr.h> | 54 | #include <linux/xattr.h> |
56 | #include <linux/utsname.h> | 55 | #include <linux/utsname.h> |
57 | #include <linux/freezer.h> | 56 | #include <linux/freezer.h> |
@@ -63,6 +62,7 @@ | |||
63 | #include "callback.h" | 62 | #include "callback.h" |
64 | #include "pnfs.h" | 63 | #include "pnfs.h" |
65 | #include "netns.h" | 64 | #include "netns.h" |
65 | #include "nfs4idmap.h" | ||
66 | #include "nfs4session.h" | 66 | #include "nfs4session.h" |
67 | #include "fscache.h" | 67 | #include "fscache.h" |
68 | 68 | ||
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index f95e3b58bbc3..935a6ffe8643 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
43 | #include <linux/fs.h> | 43 | #include <linux/fs.h> |
44 | #include <linux/nfs_fs.h> | 44 | #include <linux/nfs_fs.h> |
45 | #include <linux/nfs_idmap.h> | ||
46 | #include <linux/kthread.h> | 45 | #include <linux/kthread.h> |
47 | #include <linux/module.h> | 46 | #include <linux/module.h> |
48 | #include <linux/random.h> | 47 | #include <linux/random.h> |
@@ -57,6 +56,7 @@ | |||
57 | #include "callback.h" | 56 | #include "callback.h" |
58 | #include "delegation.h" | 57 | #include "delegation.h" |
59 | #include "internal.h" | 58 | #include "internal.h" |
59 | #include "nfs4idmap.h" | ||
60 | #include "nfs4session.h" | 60 | #include "nfs4session.h" |
61 | #include "pnfs.h" | 61 | #include "pnfs.h" |
62 | #include "netns.h" | 62 | #include "netns.h" |
diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index d91898193b2f..6fb7cb6b3f4b 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c | |||
@@ -3,12 +3,12 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/nfs_idmap.h> | ||
7 | #include <linux/nfs4_mount.h> | 6 | #include <linux/nfs4_mount.h> |
8 | #include <linux/nfs_fs.h> | 7 | #include <linux/nfs_fs.h> |
9 | #include "delegation.h" | 8 | #include "delegation.h" |
10 | #include "internal.h" | 9 | #include "internal.h" |
11 | #include "nfs4_fs.h" | 10 | #include "nfs4_fs.h" |
11 | #include "nfs4idmap.h" | ||
12 | #include "dns_resolve.h" | 12 | #include "dns_resolve.h" |
13 | #include "pnfs.h" | 13 | #include "pnfs.h" |
14 | #include "nfs.h" | 14 | #include "nfs.h" |
diff --git a/fs/nfs/nfs4sysctl.c b/fs/nfs/nfs4sysctl.c index b6ebe7e445f6..0fbd3ab1be22 100644 --- a/fs/nfs/nfs4sysctl.c +++ b/fs/nfs/nfs4sysctl.c | |||
@@ -6,10 +6,10 @@ | |||
6 | * Copyright (c) 2006 Trond Myklebust <Trond.Myklebust@netapp.com> | 6 | * Copyright (c) 2006 Trond Myklebust <Trond.Myklebust@netapp.com> |
7 | */ | 7 | */ |
8 | #include <linux/sysctl.h> | 8 | #include <linux/sysctl.h> |
9 | #include <linux/nfs_idmap.h> | ||
10 | #include <linux/nfs_fs.h> | 9 | #include <linux/nfs_fs.h> |
11 | 10 | ||
12 | #include "nfs4_fs.h" | 11 | #include "nfs4_fs.h" |
12 | #include "nfs4idmap.h" | ||
13 | #include "callback.h" | 13 | #include "callback.h" |
14 | 14 | ||
15 | static const int nfs_set_port_min = 0; | 15 | static const int nfs_set_port_min = 0; |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index a26880cb8ce8..0aea97841d30 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -52,10 +52,10 @@ | |||
52 | #include <linux/nfs.h> | 52 | #include <linux/nfs.h> |
53 | #include <linux/nfs4.h> | 53 | #include <linux/nfs4.h> |
54 | #include <linux/nfs_fs.h> | 54 | #include <linux/nfs_fs.h> |
55 | #include <linux/nfs_idmap.h> | ||
56 | 55 | ||
57 | #include "nfs4_fs.h" | 56 | #include "nfs4_fs.h" |
58 | #include "internal.h" | 57 | #include "internal.h" |
58 | #include "nfs4idmap.h" | ||
59 | #include "nfs4session.h" | 59 | #include "nfs4session.h" |
60 | #include "pnfs.h" | 60 | #include "pnfs.h" |
61 | #include "netns.h" | 61 | #include "netns.h" |