From a4a0054caee6c75ae442d4984b95bf9753eded36 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Wed, 3 Jun 2009 01:05:42 +0000 Subject: 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 --- libglusterfsclient/src/libglusterfsclient-internals.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libglusterfsclient/src/libglusterfsclient-internals.h') 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 { -- cgit