summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-helpers.c
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-10-23 08:23:20 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-23 07:03:23 -0700
commita5219b99db8076dc8606a44fd1cfaf2bd69a0d31 (patch)
treece13c65399269622be4d14e4a7ecba537737bf24 /xlators/protocol/server/src/server-helpers.c
parent52b02bbabaaa78061c6b223715f57853cbcfd652 (diff)
protocol/server: deep resolution support
when requested ino/gen is not available in the inode table cache, then use the path presented by the client to lookup entries with the hope that the requested ino/gen gets populated into the cache. re-perform regular search after finishing the deep component lookup Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
-rw-r--r--xlators/protocol/server/src/server-helpers.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index b074ab9b5d0..ae33d6848d9 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -190,11 +190,28 @@ server_loc_wipe (loc_t *loc)
void
server_resolve_wipe (server_resolve_t *resolve)
{
+ struct resolve_comp *comp = NULL;
+ int i = 0;
+
if (resolve->path)
FREE (resolve->path);
if (resolve->bname)
FREE (resolve->bname);
+
+ if (resolve->resolved)
+ FREE (resolve->resolved);
+
+ loc_wipe (&resolve->deep_loc);
+
+ comp = resolve->components;
+ if (comp) {
+ for (i = 0; comp[i].basename; i++) {
+ if (comp[i].inode)
+ inode_unref (comp[i].inode);
+ }
+ FREE (resolve->components);
+ }
}