summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorshishir gowda <sgowda@redhat.com>2012-08-07 12:55:31 +0530
committerAnand Avati <avati@redhat.com>2012-08-13 23:24:04 -0700
commite404e9b81f18c0a36a5c67ebf041ac0a00ca2eb1 (patch)
treed0d1abbbfcd100814487cb1692487a6c98989c45 /libglusterfs/src
parentcdf6ad3695b0842acc3d4aadc5ebb474f07e8913 (diff)
cluster/dht: Optimize readdirp calls in DHT
Bring in option which is supported by posix xlator to filter out directory's entries from being returned. DHT would now request non-first subvols to filter out directory entries. dht xlator-option readdir-optimize will enable this optimization Change-Id: I35224bc81c9657f54f952efac02790276c35ded5 BUG: 838199 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/gf-dirent.h1
-rw-r--r--libglusterfs/src/glusterfs.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/gf-dirent.h b/libglusterfs/src/gf-dirent.h
index 36a5a629cf2..26cb5a66872 100644
--- a/libglusterfs/src/gf-dirent.h
+++ b/libglusterfs/src/gf-dirent.h
@@ -48,6 +48,7 @@ struct _gf_dirent_t {
char d_name[0];
};
+#define DT_ISDIR(mode) (mode == DT_DIR)
gf_dirent_t *gf_dirent_for_name (const char *name);
void gf_dirent_free (gf_dirent_t *entries);
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 5c2843851fe..8fc49d3d2c5 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -82,6 +82,8 @@
#define GF_XATTR_NODE_UUID_KEY "trusted.glusterfs.node-uuid"
#define GF_XATTR_VOL_ID_KEY "trusted.glusterfs.volume-id"
+#define GF_READDIR_SKIP_DIRS "readdir-filter-directories"
+
#define XATTR_IS_PATHINFO(x) (strncmp (x, GF_XATTR_PATHINFO_KEY, \
strlen (GF_XATTR_PATHINFO_KEY)) == 0)
#define XATTR_IS_NODE_UUID(x) (strncmp (x, GF_XATTR_NODE_UUID_KEY, \