diff options
author | Christoph Hellwig <hch@infradead.org> | 2005-07-24 18:53:01 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:57 -0400 |
commit | 278c995c8a153bb2a9bc427e931cfb9c8034c9d7 (patch) | |
tree | fe1b62d1686c78659133d751393ab2d5acf38665 /fs | |
parent | 470056c288334eb0b37be26c9ff8aee37ed1cc7a (diff) |
[PATCH] RPC,NFS: new rpc_pipefs patch
Currently rpc_mkdir/rpc_rmdir and rpc_mkpipe/mk_unlink have an API that's
a little unfortunate. They take a path relative to the rpc_pipefs root and
thus need to perform a full lookup. If you look at debugfs or usbfs they
always store the dentry for directories they created and thus can pass in
a dentry + single pathname component pair into their equivalents of the
above functions.
And in fact rpc_pipefs actually stores a dentry for all but one component so
this change not only simplifies the core rpc_pipe code but also the callers.
Unfortuntately this code path is only used by the NFS4 idmapper and
AUTH_GSSAPI for which I don't have a test enviroment. Could someone give
it a spin? It's the last bit needed before we can rework the
lookup_hash API
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/idmap.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index ffb8df91dc34..1d0a5bf0d264 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -66,7 +66,6 @@ struct idmap_hashtable { | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | struct idmap { | 68 | struct idmap { |
69 | char idmap_path[48]; | ||
70 | struct dentry *idmap_dentry; | 69 | struct dentry *idmap_dentry; |
71 | wait_queue_head_t idmap_wq; | 70 | wait_queue_head_t idmap_wq; |
72 | struct idmap_msg idmap_im; | 71 | struct idmap_msg idmap_im; |
@@ -102,11 +101,8 @@ nfs_idmap_new(struct nfs4_client *clp) | |||
102 | 101 | ||
103 | memset(idmap, 0, sizeof(*idmap)); | 102 | memset(idmap, 0, sizeof(*idmap)); |
104 | 103 | ||
105 | snprintf(idmap->idmap_path, sizeof(idmap->idmap_path), | 104 | idmap->idmap_dentry = rpc_mkpipe(clp->cl_rpcclient->cl_dentry, |
106 | "%s/idmap", clp->cl_rpcclient->cl_pathname); | 105 | "idmap", idmap, &idmap_upcall_ops, 0); |
107 | |||
108 | idmap->idmap_dentry = rpc_mkpipe(idmap->idmap_path, | ||
109 | idmap, &idmap_upcall_ops, 0); | ||
110 | if (IS_ERR(idmap->idmap_dentry)) { | 106 | if (IS_ERR(idmap->idmap_dentry)) { |
111 | kfree(idmap); | 107 | kfree(idmap); |
112 | return; | 108 | return; |
@@ -128,7 +124,7 @@ nfs_idmap_delete(struct nfs4_client *clp) | |||
128 | 124 | ||
129 | if (!idmap) | 125 | if (!idmap) |
130 | return; | 126 | return; |
131 | rpc_unlink(idmap->idmap_path); | 127 | rpc_unlink(idmap->idmap_dentry); |
132 | clp->cl_idmap = NULL; | 128 | clp->cl_idmap = NULL; |
133 | kfree(idmap); | 129 | kfree(idmap); |
134 | } | 130 | } |