<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 3:31 AM, Ankireddypalle Reddy <span dir="ltr">&lt;<a href="mailto:areddy@commvault.com" target="_blank">areddy@commvault.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Kaushal/Pranith,<br>
                                  Thanks for clarifying this. As I understand there are 2 id&#39;s. Please correct if there is a mistake in my assumptions:<br>
                                  1) HASH generated by DHT and this will generate the same id for a given file all the time.<br>
                                  2) GFID which is an version 4 UUID. As per the below links this is supposed to contain a time stamp field in it.  So this will not generate the same id for a given file all the time.<br>
                                       <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/<wbr>Universally_unique_identifier</a><br>
                                       <a href="https://tools.ietf.org/html/rfc4122" rel="noreferrer" target="_blank">https://tools.ietf.org/html/<wbr>rfc4122</a></blockquote><div><br></div><div>That is correct. There is no involvement of parent gfid in either of this :-).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Thanks and Regards,<br>
ram<br>
<span class="im HOEnZb">-----Original Message-----<br>
From: Kaushal M [mailto:<a href="mailto:kshlmster@gmail.com">kshlmster@gmail.com</a>]<br>
Sent: Tuesday, November 15, 2016 1:21 PM<br>
To: Ankireddypalle Reddy<br>
</span><div class="HOEnZb"><div class="h5">Cc: Pranith Kumar Karampuri; <a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a>; Gluster Devel<br>
Subject: Re: [Gluster-users] gfid generation<br>
<br>
On Tue, Nov 15, 2016 at 11:33 PM, Ankireddypalle Reddy &lt;<a href="mailto:areddy@commvault.com">areddy@commvault.com</a>&gt; wrote:<br>
&gt; Pranith,<br>
&gt;<br>
&gt;                  Thanks for getting back on this. I am trying to see<br>
&gt; how gfid can be generated programmatically. Given a file name how do<br>
&gt; we generate gfid for it. I was reading some of the email threads about<br>
&gt; it where it was mentioned that gfid is generated based upon parent<br>
&gt; directory gfid and the file name. Given a same parent gfid and file<br>
&gt; name do we always end up with the same gfid.<br>
<br>
You&#39;re probably confusing the hash as generated for the elastic hash algorithm in DHT, with UUID. That is a combination of<br>
<br>
I always thought that the GFID was a UUID, which was randomly generated. (The random UUID might be being modified a little to allow some leeway with directory listing, IIRC).<br>
<br>
Adding gluster-devel to get more eyes on this.<br>
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks and Regards,<br>
&gt;<br>
&gt; ram<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; From: Pranith Kumar Karampuri [mailto:<a href="mailto:pkarampu@redhat.com">pkarampu@redhat.com</a>]<br>
&gt; Sent: Tuesday, November 15, 2016 12:58 PM<br>
&gt; To: Ankireddypalle Reddy<br>
&gt; Cc: <a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a><br>
&gt; Subject: Re: [Gluster-users] gfid generation<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Sorry, didn&#39;t understand the question. Are you saying give a file on<br>
&gt; gluster how to get gfid of the file?<br>
&gt;<br>
&gt; #getfattr -d -m. -e hex /path/to/file shows it<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Nov 11, 2016 at 9:47 PM, Ankireddypalle Reddy<br>
&gt; &lt;<a href="mailto:areddy@commvault.com">areddy@commvault.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt;         Is the mapping from file name to gfid an idempotent operation.<br>
&gt; If so please point me to the function that does this.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks and Regards,<br>
&gt;<br>
&gt; Ram<br>
&gt;<br>
&gt; ***************************<wbr>Legal Disclaimer********************<wbr>*******<br>
&gt;<br>
&gt; &quot;This communication may contain confidential and privileged material<br>
&gt; for the<br>
&gt;<br>
&gt; sole use of the intended recipient. Any unauthorized review, use or<br>
&gt; distribution<br>
&gt;<br>
&gt; by others is strictly prohibited. If you have received the message by<br>
&gt; mistake,<br>
&gt;<br>
&gt; please advise the sender by reply email and delete the message. Thank you.&quot;<br>
&gt;<br>
&gt; ******************************<wbr>******************************<wbr>**********<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Gluster-users mailing list<br>
&gt; <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>mailman/listinfo/gluster-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; Pranith<br>
&gt;<br>
&gt; ***************************<wbr>Legal Disclaimer********************<wbr>*******<br>
&gt; &quot;This communication may contain confidential and privileged material<br>
&gt; for the sole use of the intended recipient. Any unauthorized review,<br>
&gt; use or distribution by others is strictly prohibited. If you have<br>
&gt; received the message by mistake, please advise the sender by reply<br>
&gt; email and delete the message. Thank you.&quot;<br>
&gt; ******************************<wbr>******************************<wbr>**********<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Gluster-users mailing list<br>
&gt; <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>mailman/listinfo/gluster-users</a><br>
***************************<wbr>Legal Disclaimer********************<wbr>*******<br>
&quot;This communication may contain confidential and privileged material for the<br>
sole use of the intended recipient. Any unauthorized review, use or distribution<br>
by others is strictly prohibited. If you have received the message by mistake,<br>
please advise the sender by reply email and delete the message. Thank you.&quot;<br>
******************************<wbr>******************************<wbr>**********<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</div></div>