[Gluster-devel] answer_list in EC xlator

Pranith Kumar Karampuri pkarampu at redhat.com
Wed Jun 3 03:40:12 UTC 2015



On 06/02/2015 08:08 PM, fanghuang.data at yahoo.com wrote:
> Hi all,
>
> As I reading the source codes of EC xlator, I am confused by the 
> cbk_list and answer_list defined in struct _ec_fop_data. Why do we 
> need two lists to combine the results of callback?
>
> Especially for the answer_list, it is initialized 
> in ec_fop_data_allocate, then the nodes are added 
> in ec_cbk_data_allocate. Without being any accessed during the 
> lifetime of fop, the whole list finally is released in ec_fop_cleanup. 
> Do I miss something for the answer_list?
+Xavi.

hi,
     The only reason I found is that It is easier to cleanup cbks using 
answers_list. You can check ec_fop_cleanup() function on latest master 
to check how this is. Combining of cbks is a bit involved until you 
understand it but once you do, it is amazing. I tried to add comments 
for this part of code and sent a patch, but we forgot to merge it :-) 
http://review.gluster.org/9982. If you think we can add more 
comments/change this part of code in a way it makes it easier, let us 
know. We would love your feedback :-). Wait for Xavi's response as well.

Pranith
> Regards,
> Fang Huang
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20150603/b6af8570/attachment.html>


More information about the Gluster-devel mailing list