<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"><<a href="mailto:areddy@commvault.com" target="_blank">areddy@commvault.com</a>></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'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 <<a href="mailto:areddy@commvault.com">areddy@commvault.com</a>> wrote:<br>
> Pranith,<br>
><br>
> Thanks for getting back on this. I am trying to see<br>
> how gfid can be generated programmatically. Given a file name how do<br>
> we generate gfid for it. I was reading some of the email threads about<br>
> it where it was mentioned that gfid is generated based upon parent<br>
> directory gfid and the file name. Given a same parent gfid and file<br>
> name do we always end up with the same gfid.<br>
<br>
You'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>
><br>
><br>
><br>
> Thanks and Regards,<br>
><br>
> ram<br>
><br>
><br>
><br>
> From: Pranith Kumar Karampuri [mailto:<a href="mailto:pkarampu@redhat.com">pkarampu@redhat.com</a>]<br>
> Sent: Tuesday, November 15, 2016 12:58 PM<br>
> To: Ankireddypalle Reddy<br>
> Cc: <a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a><br>
> Subject: Re: [Gluster-users] gfid generation<br>
><br>
><br>
><br>
> Sorry, didn't understand the question. Are you saying give a file on<br>
> gluster how to get gfid of the file?<br>
><br>
> #getfattr -d -m. -e hex /path/to/file shows it<br>
><br>
><br>
><br>
> On Fri, Nov 11, 2016 at 9:47 PM, Ankireddypalle Reddy<br>
> <<a href="mailto:areddy@commvault.com">areddy@commvault.com</a>><br>
> wrote:<br>
><br>
> Hi,<br>
><br>
> Is the mapping from file name to gfid an idempotent operation.<br>
> If so please point me to the function that does this.<br>
><br>
><br>
><br>
> Thanks and Regards,<br>
><br>
> Ram<br>
><br>
> ***************************<wbr>Legal Disclaimer********************<wbr>*******<br>
><br>
> "This communication may contain confidential and privileged material<br>
> for the<br>
><br>
> sole use of the intended recipient. Any unauthorized review, use or<br>
> distribution<br>
><br>
> by others is strictly prohibited. If you have received the message by<br>
> mistake,<br>
><br>
> please advise the sender by reply email and delete the message. Thank you."<br>
><br>
> ******************************<wbr>******************************<wbr>**********<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-users mailing list<br>
> <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> <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>
><br>
><br>
><br>
><br>
> --<br>
><br>
> Pranith<br>
><br>
> ***************************<wbr>Legal Disclaimer********************<wbr>*******<br>
> "This communication may contain confidential and privileged material<br>
> for the sole use of the intended recipient. Any unauthorized review,<br>
> use or distribution by others is strictly prohibited. If you have<br>
> received the message by mistake, please advise the sender by reply<br>
> email and delete the message. Thank you."<br>
> ******************************<wbr>******************************<wbr>**********<br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-users mailing list<br>
> <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> <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>
"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."<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>