summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorSakshi <sabansal@redhat.com>2017-01-23 12:11:49 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-05-31 14:13:01 +0000
commitb9406e210717621bc672a63c1cbd1b0183834056 (patch)
tree8bf3d1787d928c121e52f4b9820a27a47957361c /xlators/cluster/dht/src/dht-common.h
parent57b0a4a374a604079f37a9d9d9fffb09a718c010 (diff)
cluster/dht: Make optimal usage of buffer provided with readdir(p)
dht_readdirp must unwind with list of entries only after the entire buffer requested by kernel is filled to avoid extra syscalls occuring when returning partially filled buffer. Also wind readdir call to next subvol on reaching EOD for directory on that subvol to avoid extra network call. Change-Id: If2e1a2722f813d95457c7542bff25fef56c7a041 BUG: 1356453 Signed-off-by: Sakshi <sabansal@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://review.gluster.org/12271 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 786db020427..333fae8c894 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -346,6 +346,10 @@ struct dht_local {
call_stub_t *stub;
int32_t parent_disk_layout[4];
+ /* To hold dentries of readdir spawning across subvols */
+ gf_dirent_t entries;
+ size_t filled;
+
/* rename rollback */
int *ret_cache ;
};