<div dir="ltr"><div>hi Mohit,<br></div>       How does dht find which subvolume has the correct list of xattrs? i.e. how does it determine which subvolume is source and which is sink?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 7, 2016 at 2:35 PM, Mohit Agrawal <span dir="ltr">&lt;<a href="mailto:moagrawa@redhat.com" target="_blank">moagrawa@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>  I am trying to find out solution of one problem in dht specific to user xattr healing.<br>  I tried to correct it in a same way as we are doing for healing dir attribute but i feel it is not best solution.<br>  <br>  To find a right way to heal xattr i want to discuss with you if anyone does have better solution to correct it.<br><br>  Problem:<br>   In a distributed volume environment custom extended attribute value for a directory does not display correct value after stop/start the brick. If any extended attribute value is set for a directory after stop the brick the attribute value is not updated on brick after start the brick.<br>    <br>  Current approach:<br>    1) function set_user_xattr to store user extended attribute in dictionary  <br>    2) function dht_dir_xattr_heal call syncop_setxattr to update the attribute on all volume <br>    3) Call the function (dht_dir_xattr_heal) for every directory lookup in dht_lookup_revalidate_cbk<br><br>  Psuedocode for function dht_dir_xatt_heal is like below<br><br>   1) First it will fetch atttributes from first up volume and store into xattr.<br>   2) Run loop on all subvolume and fetch existing attributes from every volume <br>   3) Replace user attributes from current attributes with xattr user attributes <br>   4) Set latest extended attributes(current + old user attributes) inot subvol.<br><br><br>   In this current approach problem is <br>    <br>   1) it will call heal function(dht_dir_xattr_heal) for every directory lookup without comparing xattr. <br>    2) The function internally call syncop xattr for every subvolume that would be a expensive operation.     <br>    <br>   I have one another way like below to correct it but again in this one it does have dependency on time (not sure time is synch on all bricks or not)<br><br>   1) At the time of set extended attribute(setxattr) change time in metadata at server side<br>   2) Compare change time before call healing function in dht_revalidate_cbk<br><br>    Please share your input on this.<br>    Appreciate your input.<br><br>Regards<span class="HOEnZb"><font color="#888888"><br>Mohit Agrawal<br></font></span></div>
<br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</div>