<div dir="ltr"><div>Hi Xavier,</div><div><br></div><div>Thank you very much for your explanation. This helped  me to understand  more  about  locking in EC.</div><div><br></div><div>Best Regards</div><div>JK</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 28, 2016 at 4:17 PM, Xavier Hernandez <span dir="ltr">&lt;<a href="mailto:xhernandez@datalab.es" target="_blank">xhernandez@datalab.es</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<span><br>
<br>
On 11/28/2016 02:59 AM, jayakrishnan mm wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
Hi Xavier,<br>
<br>
Notice  that EC xlator uses blocking locks. Any specific reason for this?<br>
</blockquote>
<br></span>
In a distributed filesystem like gluster a synchronization mechanism is a must to avoid data corruption.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
Do you think this will  affect the  performance ?<br>
</blockquote>
<br></span>
Of course the need for locks has a performance impact, and we cannot avoid them to guarantee data integrity. However some optimizations have been applied, specially the eager locking which allows a lock to be reused without unlocking/locking again.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
(In comparison AFR  first tries  non blocking locks  and if not<br>
successful, tries blocking locks then)<br>
</blockquote>
<br></span>
EC also tries a non-blocking lock first.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
Also, why two locks  are  needed  per FOP ? One for normal I/O and<br>
another for self healing?<br>
</blockquote>
<br></span>
The only fop that currently needs two locks is &#39;rename&#39;, and only when source and destination directories are different. All other fops only take one lock at most.<br>
<br>
Best regards,<br>
<br>
Xavi<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
Best regards<br>
JK<br>
<br>
<br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank" rel="noreferrer">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>