diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-13 11:34:01 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-22 08:58:25 -0400 |
commit | 1f2d30b5338f1adaac249707ae49f1c675049cfc (patch) | |
tree | 555e65b82ab63749d19bf05d552262146094e1ab /fs/nfs/idmap.c | |
parent | ca8acf8d84029b395ade8d4562dae2108bb00c17 (diff) |
NFSv4: Add tracepoints for debugging the idmapper
Add tracepoints to help debug uid/gid mappings to username/group.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/idmap.c')
-rw-r--r-- | fs/nfs/idmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 65c7d91f66f7..e9b0c59f9286 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -49,6 +49,7 @@ #include "internal.h" #include "netns.h" +#include "nfs4trace.h" #define NFS_UINT_MAXLEN 11 @@ -849,6 +850,7 @@ int nfs_map_name_to_uid(const struct nfs_server *server, const char *name, size_ if (!uid_valid(*uid)) ret = -ERANGE; } + trace_nfs4_map_name_to_uid(name, namelen, id, ret); return ret; } @@ -865,6 +867,7 @@ int nfs_map_group_to_gid(const struct nfs_server *server, const char *name, size if (!gid_valid(*gid)) ret = -ERANGE; } + trace_nfs4_map_group_to_gid(name, namelen, id, ret); return ret; } @@ -879,6 +882,7 @@ int nfs_map_uid_to_name(const struct nfs_server *server, kuid_t uid, char *buf, ret = nfs_idmap_lookup_name(id, "user", buf, buflen, idmap); if (ret < 0) ret = nfs_map_numeric_to_string(id, buf, buflen); + trace_nfs4_map_uid_to_name(buf, ret, id, ret); return ret; } int nfs_map_gid_to_group(const struct nfs_server *server, kgid_t gid, char *buf, size_t buflen) @@ -892,5 +896,6 @@ int nfs_map_gid_to_group(const struct nfs_server *server, kgid_t gid, char *buf, ret = nfs_idmap_lookup_name(id, "group", buf, buflen, idmap); if (ret < 0) ret = nfs_map_numeric_to_string(id, buf, buflen); + trace_nfs4_map_gid_to_group(buf, ret, id, ret); return ret; } |