<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello, Poorinima and Soumya,</p>
<p><br>
</p>
<p>Thanks for your kind reply. </p>
<p>As you said, for the "first" lookup(called in fuse_first_lookup), xdata will be set "gfid-req", which will miss the md-cache, and then call other translators.</p>
<p><br>
</p>
<p>However, in fuse_getattr, when nodeid==1, gfid-req is set to "gfid-req", too. That is to say, every fuse_getattr in root, a lookup with "gfid-req" is called, this call will
<b>miss the md-cache</b>, then takes a high cost. </p>
<p><br>
</p>
<p><b>Is it necessary to lookup with "gfid-req" in fuse_getattr? </b></p>
<p><br>
</p>
<p>In fact, whether we lookup with a "gfid-req" decides the performance of fuse_getattr. In my case, I need to call many times fuse_getattr, so it does matter!</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="x_Signature">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Best regards,</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Zhitao Li</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Sent from <a href="http://aka.ms/weboutlook" id="LPNoLP">Outlook</a></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Poornima Gurusiddaiah <pgurusid@redhat.com><br>
<b>Sent:</b> Tuesday, March 21, 2017 3:07:01 PM<br>
<b>To:</b> Soumya Koduri<br>
<b>Cc:</b> Zhitao Li; Gluster Devel; Zhitao Li; 1318078301@qq.com<br>
<b>Subject:</b> Re: [Gluster-devel] What does xdata mean? "gfid-req"?</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
<br>
----- Original Message -----<br>
> From: "Soumya Koduri" <skoduri@redhat.com><br>
> To: "Zhitao Li" <zhitaoli1201@outlook.com>, "Gluster Devel" <gluster-devel@gluster.org><br>
> Cc: "Zhitao Li" <zhitaoli1201@163.com>, 1318078301@qq.com, "Poornima Gurusiddaiah" <pgurusid@redhat.com><br>
> Sent: Monday, March 20, 2017 2:21:12 PM<br>
> Subject: Re: [Gluster-devel] What does xdata mean? "gfid-req"?<br>
> <br>
> <br>
> <br>
> On 03/18/2017 06:51 PM, Zhitao Li wrote:<br>
> > Hello, everyone,<br>
> ><br>
> ><br>
> > I am investigating the difference between stat and lookup operations in<br>
> > GlusterFs now. In the translator named "md_cache", stat operation will<br>
> > hit the cache generally, while lookup operation will miss the cache.<br>
> ><br>
> ><br>
> > The reason is that for lookup operation, md_cache will check whether the<br>
> > xdata is satisfied. In my case, lookup will include xdata "gfid-req"<br>
> > filled by fuse-bridge. However, in md_cache, this check never pass<br>
> > because the load flag of mdc_key "gfid-req" is always 0.<br>
> <br>
> Client(in this case fuse-bridge) generates gfid and sets it as xdata<br>
> 'gfid-req' key during the first lookup so as to let server heal the<br>
> file/dir with the missing gfid (if any) with the newly generated one.<br>
> <br>
> I guess md-cache ignores the LOOKUP fop with this xdata key set as it<br>
> implies that its the first lookup done by the client. Even if it doesn't<br>
> filter it out, the file/dir entry will not be present in the<br>
> cache then. Subsequent LOOKUPs should be served from md-cache. Poornima<br>
> (cc'ed) shall be able to clarify the actual reason.<br>
<br>
Yes, gfid-req will be set only on the first lookup. If not then that definitely<br>
needs to be looked at.<br>
<br>
> <br>
> Thanks,<br>
> Soumya<br>
> <br>
> ><br>
> ><br>
> > Could anyone tell me why "gfid-req" is filled by<br>
> > fuse-bridge.c(fuse_getattr: nodeid==1->lookup)? What does it mean? And<br>
> > how xdata is used?<br>
> <br>
> <br>
> ><br>
> > If no xdata, what would happen?<br>
> ><br>
> > Thank you!<br>
> ><br>
> ><br>
> > Best regards,<br>
> > Zhitao Li<br>
> ><br>
> > Sent from Outlook <<a href="http://aka.ms/weboutlook">http://aka.ms/weboutlook</a>><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Gluster-devel mailing list<br>
> > Gluster-devel@gluster.org<br>
> > <a href="http://lists.gluster.org/mailman/listinfo/gluster-devel">http://lists.gluster.org/mailman/listinfo/gluster-devel</a><br>
> ><br>
> <br>
</div>
</span></font>
</body>
</html>