<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<br>Mohit Agrawal<br></div>