summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient-internals.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-06-03 01:05:42 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-08 06:31:56 -0700
commitc6d33dfbdc9db147fa6028d8c3daa8e79b0b4276 (patch)
tree0a4581331204d1a65affe42ac277262c0216ab15 /libglusterfsclient/src/libglusterfsclient-internals.h
parent6a0ab0b2edca89da524b7dcf29994033f98c8552 (diff)
libglusterfsclient: Avoid dirent copies in readdir cbk
We can avoid memory allocation, de-allocation and data copies by just using the entries passed to us from a lower layer and by de-linking the entries from the original list. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient-internals.h')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient-internals.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-internals.h b/libglusterfsclient/src/libglusterfsclient-internals.h
index fc79a539d69..d55cfb1f5f6 100755
--- a/libglusterfsclient/src/libglusterfsclient-internals.h
+++ b/libglusterfsclient/src/libglusterfsclient-internals.h
@@ -64,6 +64,11 @@ typedef struct {
int32_t size;
} lookup;
}fop;
+ fd_t *dirfd; /* Needed here because we need a ref to the dir
+ fd in the libgf_client_readdir_cbk in order
+ to process the dirents received, without
+ having them added to the reply stub.
+ */
}libgf_client_local_t;
typedef struct {