diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2009-07-19 03:25:45 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-20 14:29:37 -0700 |
commit | 7b90b90780d3bb5a1b4a1c060fac1d2c4eb2a8dc (patch) | |
tree | afb00b20556d3cd7002f3d797479c71d0e1fa334 /libglusterfsclient/src/libglusterfsclient-dentry.c | |
parent | 20a142f76834668b9e1674010ba5af0b4b441474 (diff) |
libglusterfsclient: Move DHT root-lookup workaround to init
The workaround for the DHT requirement for a lookup on /
needs to be done only once when the xlator graph is inited.
Doing it on every path's lookup results in a major performance
penalty when using distribute subvolumes upwards of 16, as reported
by Avati.
Ref: bug 152
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 152 (libglusterfsclient: DHT workaround is a major performance bottleneck)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=152
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient-dentry.c')
-rw-r--r-- | libglusterfsclient/src/libglusterfsclient-dentry.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-dentry.c b/libglusterfsclient/src/libglusterfsclient-dentry.c index 09820457b..1c8910159 100644 --- a/libglusterfsclient/src/libglusterfsclient-dentry.c +++ b/libglusterfsclient/src/libglusterfsclient-dentry.c @@ -343,21 +343,6 @@ libgf_client_path_lookup (loc_t *loc, inode_t *inode = NULL; inode_t *parent = NULL; int32_t op_ret = 0; - loc_t new_loc = {0, }; - - /* workaround for xlators like dht which require lookup to be sent - on / */ - - libgf_client_loc_fill (&new_loc, ctx, 1, 0, "/"); - - op_ret = libgf_client_lookup (ctx, &new_loc, NULL, NULL, NULL); - if (op_ret == -1) { - gf_log ("libglusterfsclient-dentry", - GF_LOG_ERROR, - "lookup of / failed"); - goto out; - } - libgf_client_loc_wipe (&new_loc); pathname = strdup (loc->path); directory = dirname (pathname); |