<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 21, 2018 at 6:55 AM, Raghavendra Gowdappa <span dir="ltr">&lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jun 20, 2018 at 9:09 PM, Xavi Hernandez <span dir="ltr">&lt;<a href="mailto:xhernandez@redhat.com" target="_blank">xhernandez@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"><div class="gmail_quote"><span><div dir="ltr">On Wed, Jun 20, 2018 at 4:29 PM Raghavendra Gowdappa &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Krutika,<br><br></div>This patch doesn&#39;t seem to be getting counts per domain, like number of inodelks or entrylks acquired in a domain &quot;xyz&quot;. Am I right? If per domain stats are not available, passing interested domains in xdata_req would be needed. Any suggestions on that?<br></div></div></div></blockquote><div><br></div></span><div>We have GLUSTERFS_INODELK_DOM_COUNT. Its data should be a domain name for which we want to know the number of inodelks (the count is returned into GLUSTERFS_INODELK_COUNT though).</div><div><br></div><div>It only exists for inodelk. If you need it for entrylk, it would need to be implemented.</div></div></div></blockquote><div><br></div></span><div>Yes. Realised that after going through the patch a bit more deeply. Thanks. I&#39;ll implement a domain based entrylk count.</div></div></div></div></blockquote><div><br></div><div>I think I need to have a dynamic key for responses. Otherwise its difficult to support requests on multiple domain in the same call. Embedding the domain name in key helps us to keep per domain results separate. Also needed is ways to send multiple domains in requests. If EC/AFR is already using it, there is high chance of overwriting previously set requests for different domains. Currently this is not consumed in lookup path by EC/AFR/Shard (DHT is interested for this information in lookup path) and hence not a pressing problem. But, we cannot rely on that.<br></div><div><br></div><div> what do you think is a better interface among following alternatives?</div><div><br></div><div>In request path,</div><div><br></div><div>1. Separate keys with domain name embedded - For eg., glusterfs.inodelk.xyz.count. Value is ignored.</div><div>2. A single key like GLUSTERFS_INODELK_DOM_COUNT. Value is a string of interested domains separated by a delimiter (which character to use as delimiter?)<br></div><div><br></div><div>In response path,</div><div>1. Separate keys with domain name embedded - For eg., glusterfs.inodelk.xyz.count. Value is the total number of locks (granted + blocked).</div><div>2. A single  key like GLUSTERFS_INODELK_DOM_COUNT. Value is a string of interested domains and lock count separated by a delimiter (which character to use as delimiter?)</div><div><br></div><div>I personally prefer the domain name embedded in key approach as it avoids the string parsing by consumers. Any other approaches you can think of?</div><div><br></div><div>As of now response returned is number of (granted + blocked) locks. For consumers using write-locks granted locks is always 1 and hence blocked locks can be inferred. But read-locks consumers this is not possible as there can be more than one read-lock consumers. For the requirement in DHT, we don&#39;t need the exact number. Instead we need the information about are there any granted locks, which can be given by the existing implementation. So, I am not changing that.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span class="m_4128236827515722390HOEnZb"><font color="#888888"><div><br></div><div>Xavi</div></font></span><div><div class="m_4128236827515722390h5"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br></div>regards,<br></div>Raghavendra<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 20, 2018 at 12:58 PM, Raghavendra Gowdappa <span dir="ltr">&lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Jun 20, 2018 at 12:06 PM, Krutika Dhananjay <span dir="ltr">&lt;<a href="mailto:kdhananj@redhat.com" target="_blank">kdhananj@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"><div>We do already have a way to get inodelk and entrylk count from a bunch of fops, introduced in <a href="http://review.gluster.org/10880" target="_blank">http://review.gluster.org/1088<wbr>0</a>.</div><div>Can you check if you can make use of this feature?</div></div></blockquote><div><br></div></span><div>Thanks Krutika. Yes, this feature meets DHT&#39;s requirement. We might need a GLUSTERFS_PARENT_INODELK, but that can be easily added along the lines of other counts. If necessary I&#39;ll send a patch to implement GLUSTERFS_PARENT_INODELK.</div><div><div class="m_4128236827515722390m_-1625986386302876334m_-8264278648685555924h5"><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>-Krutika<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4128236827515722390m_-1625986386302876334m_-8264278648685555924m_3566330009781316678h5">On Wed, Jun 20, 2018 at 9:17 AM, Amar Tumballi <span dir="ltr">&lt;<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_4128236827515722390m_-1625986386302876334m_-8264278648685555924m_3566330009781316678h5"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Jun 20, 2018 at 9:06 AM, Raghavendra Gowdappa <span dir="ltr">&lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@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"><div><div><div><div><div><div><div><div><div><div>All,<br><br></div>We&#39;ve a requirement in DHT [1] to query the number of locks granted on an inode in lookup fop. I am planning to use xdata_req in lookup to pass down the relevant arguments for this query. I am proposing following signature:<br><br></div>In lookup request path following key value pairs will be passed in xdata_req:<br></div>* &quot;glusterfs.lock.type&quot; <br></div>    - values can be &quot;glusterfs.posix&quot;, &quot;glusterfs.inodelk&quot;, &quot;glusterfs.entrylk&quot;<br></div>* If the value of &quot;glusterfs.lock.type&quot; is &quot;glusterfs.entrylk&quot;, then basename is passed as a value in xdata_req for key &quot;glusterfs.entrylk.basename&quot;</div><div>* key &quot;glusterfs.lock-on?&quot; will differentiate whether the lock information is on current inode (&quot;glusterfs.current-inode&quot;) or parent-inode (&quot;glusterfs.parent-inode&quot;). For a nameless lookup &quot;glusterfs.parent-inode&quot; is invalid.<br></div><div>* &quot;glusterfs.blocked-locks&quot; - Information should be limited to blocked locks.</div><div>* &quot;glusterfs.granted-locks&quot; - Information should be limited to granted locks.<br></div>* If necessary other information about granted locks, blocked locks can be added. Since, there is no requirement for now, I am not adding these keys.<br><br></div>Response dictionary will have information in following format:<br></div></div>* &quot;glusterfs.entrylk.&lt;gfid&gt;.&lt;bas<wbr>ename&gt;.granted-locks&quot; - number of granted entrylks on inode &quot;gfid&quot; with &quot;basename&quot; (usually this value will be either 0 or 1 unless we introduce read/write lock semantics).<br></div>* &quot;glusterfs.inodelk.&lt;gfid&gt;.gran<wbr>ted-locks&quot; - number of granted inodelks on &quot;basename&quot;<br><div><div><div><div><br><div><div><div><div>Thoughts?<br></div><div><div><br></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div></span><div>I personally feel, it is good to get as much information possible in lookup, so it helps to take some high level decisions better, in all translators. So, very broad answer would be to say go for it. The main reason the xdata is provided in all fops is to do these extra information fetching/overloading anyways.</div><div><br></div><div>As you have clearly documented the need, it makes it even better to review and document it with commit. So, all for it.</div><div><br></div><div>Regards,</div><div>Amar</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div>[1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1581306#c28" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1581306#c28</a></div><div><br></div></div></div></div></div></div></div></div></div></div></blockquote></div>
</div></div>
<br></div></div>______________________________<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://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br></blockquote></div><br></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</blockquote></div></div></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div>