summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient-internals.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-05-06 12:23:54 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-06 12:37:19 +0530
commitcba961e9f4ff3452f5e8e6152c632a258b737576 (patch)
treeb684e87138536304e513da2463196553efa0275a /libglusterfsclient/src/libglusterfsclient-internals.h
parentf82651ef4ff5a9e94fa9c0d1f9cf091345440b56 (diff)
libglusterfsclient: Improve readdir conformance on re-entrancy
readdir is supposed to be non-re-entrant only with respect to the given dir stream, not the whole process. What that means is the static struct dirent that we maintain in libglusterfsclient should be per-directory handle and not process-wide. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient-internals.h')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient-internals.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-internals.h b/libglusterfsclient/src/libglusterfsclient-internals.h
index 9646b0575ad..4cdde26e78b 100755
--- a/libglusterfsclient/src/libglusterfsclient-internals.h
+++ b/libglusterfsclient/src/libglusterfsclient-internals.h
@@ -31,6 +31,7 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <fd.h>
+#include <dirent.h>
typedef void (*sighandler_t) (int);
typedef struct list_head list_head_t;
@@ -230,4 +231,16 @@ struct vmp_entry {
};
+/* Internal directory handle inited in opendir.
+ * This is needed in order to store a per-handle
+ * dirent structure.
+ */
+struct libgf_dir_handle {
+ fd_t *dirfd;
+ struct dirent dirp;
+};
+
+
+
+
#endif