[Bugs] [Bug 1401812] RFE: Make readdirp parallel in dht
bugzilla at redhat.com
bugzilla at redhat.com
Mon Jan 9 18:37:06 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1401812
--- Comment #24 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: http://review.gluster.org/16039 committed in master by Jeff Darcy
(jdarcy at redhat.com)
------
commit a988741713752c2ec04a0680224d8fa4d42dc203
Author: Poornima G <pgurusid at redhat.com>
Date: Tue Dec 6 14:43:10 2016 +0530
dht: At places needed use STACK_WIND_COOKIE
Issue:
frame has a void * cookie pointer.
In case of STACK_WIND_COOKIE frame->cookie is assigned
to what is sent by the caller.
In case of STACK_WIND frame->cookie is assigned to point
point to the frame itself.
For ease of coding, at many places, the cookie in the cbk
is used to get the pointer to the next xl. This is
inconsistent when STACK_WIND_TAIL comes into picture.
Eg: dht_setxattr () {
for (i = 0 ; i < conf->subvolume_cnt ; i++) {
STACK_WIND (..dht_checking_pathinfo_cbk,
conf->subvolumes[i] ..);
}
dht_checking_pathinfo_cbk (...void *cookie...) {
prev = cookie;
...
for (i = 0; i < conf->subvolume_cnt; i++) {
if (conf->subvolumes[i] == prev->this) {
...
}
}
}
Consider the below graph:
dht (parent)
readdir-ahead => Doesn't define setxattr and uses STACK_WIND_TAIL
protocol-client
With this graph, when dht_checking_pathinfo_cbk is called,
cookie will have frame pointing to protocol-client.
i.e. prev->this will be protocol-client. But dht was expecting
it to be readdir-ahead as it has stored in conf->subvolumes[i]
Solution:
Hence, as a thumb rule, if cbk is using cookie, then we explicitly
call STACK_WIND_COOKIE.
Change-Id: I83aea1e24c809c5a91a0db7283e908e125471bd4
BUG: 1401812
Signed-off-by: Poornima G <pgurusid at redhat.com>
Reviewed-on: http://review.gluster.org/16039
Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
Smoke: Gluster Build System <jenkins at build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=NpIZm56z5N&a=cc_unsubscribe
More information about the Bugs
mailing list