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
commita4a0054caee6c75ae442d4984b95bf9753eded36 (patch)
treee5ce12d2d0330280f0ac519f2a721f2a78e404db /libglusterfsclient/src/libglusterfsclient-internals.h
parent4c0b91a5a045e3f03a049320d26542ab9fec4745 (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 {