diff options
author | Sakshi <sabansal@redhat.com> | 2017-01-23 12:11:49 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2017-05-31 14:13:01 +0000 |
commit | b9406e210717621bc672a63c1cbd1b0183834056 (patch) | |
tree | 8bf3d1787d928c121e52f4b9820a27a47957361c /xlators/cluster/dht/src/dht-common.h | |
parent | 57b0a4a374a604079f37a9d9d9fffb09a718c010 (diff) | |
download | glusterfs-b9406e210717621bc672a63c1cbd1b0183834056.tar.gz glusterfs-b9406e210717621bc672a63c1cbd1b0183834056.tar.xz glusterfs-b9406e210717621bc672a63c1cbd1b0183834056.zip |
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.h | 4 |
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 786db02042..333fae8c89 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 ; }; |