<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;basename&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;.granted-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>[1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1581306#c28">https://bugzilla.redhat.com/show_bug.cgi?id=1581306#c28</a></div><div><br></div><div>regards,</div><div>Raghavendra<br></div></div></div></div></div></div></div></div></div></div>