[Gluster-devel] Gluster internals
Ian Latter
ian.latter at midnightcode.org
Sun May 20 06:12:39 UTC 2012
Hello,
Couple of questions that might help make my
module a little more sane;
0) Is there any developer docco? I've just done
another quick search and I can't see any. Let
me know if there is and I'll try and answer the
below myself.
1) What is the difference between STACK_WIND
and STACK_WIND_COOKIE? I.e. I've only
ever used STACK_WIND, when should I use
it versus the other?
2) Is there a way to write linearly within a single
function within Gluster (or is there a reason
why I wouldn't want to do that)?
RE 2:
This may stem from my lack of understanding
of the broader Gluster internals. I am performing
multiple fops per fop, which is creating structural
inelegances in the code that make me think I'm
heading down the wrong rabbit hole. I want to
say;
read() {
// pull in other content
while(want more) {
_lookup()
_open()
_read()
_close()
}
return iovec
}
But the way I've understood the Gluster internal
structure is that I need to operate in a chain of
related functions;
_read_lookup_cbk_open_cbk_read_cbk() {
wind _close()
}
_read_lookup_cbk_open_cbk() {
wind _read()
add to local->iovec
}
_lookup_cbk() {
wind _open()
}
read() {
while(want more) {
wind _lookup()
}
return local->iovec
}
Am I missing something - or is there a nicer way of
doing this?
Cheers,
--
Ian Latter
Late night coder ..
http://midnightcode.org/
More information about the Gluster-devel
mailing list