<html><body><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000"><div>In gfapi, we pass down readdirp, irrespective of whether the application called readdir/readdirp.</div><div>Hence the behaviour will be same for samba and Ganesha i suppose.<br></div><div><br></div><div>Regards,<br></div><div>Poornima<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Pranith Kumar Karampuri" <pkarampu@redhat.com><br><b>To: </b>"Raghavendra Gowdappa" <rgowdapp@redhat.com>, "Poornima Gurusiddaiah" <pgurusid@redhat.com>, "Raghavendra Talur" <rtalur@redhat.com>, "Soumya Koduri" <skoduri@redhat.com><br><b>Cc: </b>"Shyam Ranganathan" <srangana@redhat.com>, "Nithya Balachandran" <nbalacha@redhat.com>, "Gluster Devel" <gluster-devel@gluster.org><br><b>Sent: </b>Friday, September 30, 2016 12:38:06 AM<br><b>Subject: </b>Re: Dht readdir filtering out names<br><div><br></div><div dir="ltr">Does samba/gfapi/nfs-ganesha have options to disable readdirp?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 10:04 AM, Pranith Kumar Karampuri <span dir="ltr"><<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What if the lower xlators want to set the entry->inode to NULL and clear the entry->d_stat to force a lookup on the name? i.e. gfid-split-brain/ia_type mismatches. <br></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 10:00 AM, Raghavendra Gowdappa <span dir="ltr"><<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
----- Original Message -----<br>
> From: "Raghavendra Gowdappa" <<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>><br>
> To: "Pranith Kumar Karampuri" <<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>><br>
> Cc: "Shyam Ranganathan" <<a href="mailto:srangana@redhat.com" target="_blank">srangana@redhat.com</a>>, "Nithya Balachandran" <<a href="mailto:nbalacha@redhat.com" target="_blank">nbalacha@redhat.com</a>>, "Gluster Devel"<br>
> <<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>><br>
</span><div><div>> Sent: Friday, September 30, 2016 9:58:34 AM<br>
> Subject: Re: Dht readdir filtering out names<br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> > From: "Pranith Kumar Karampuri" <<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>><br>
> > To: "Raghavendra Gowdappa" <<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>><br>
> > Cc: "Shyam Ranganathan" <<a href="mailto:srangana@redhat.com" target="_blank">srangana@redhat.com</a>>, "Nithya Balachandran"<br>
> > <<a href="mailto:nbalacha@redhat.com" target="_blank">nbalacha@redhat.com</a>>, "Gluster Devel"<br>
> > <<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>><br>
> > Sent: Friday, September 30, 2016 9:53:44 AM<br>
> > Subject: Re: Dht readdir filtering out names<br>
> ><br>
> > On Fri, Sep 30, 2016 at 9:50 AM, Raghavendra Gowdappa <<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>><br>
> > wrote:<br>
> ><br>
> > ><br>
> > ><br>
> > > ----- Original Message -----<br>
> > > > From: "Pranith Kumar Karampuri" <<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>><br>
> > > > To: "Raghavendra Gowdappa" <<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>><br>
> > > > Cc: "Shyam Ranganathan" <<a href="mailto:srangana@redhat.com" target="_blank">srangana@redhat.com</a>>, "Nithya Balachandran" <<br>
> > > <a href="mailto:nbalacha@redhat.com" target="_blank">nbalacha@redhat.com</a>>, "Gluster Devel"<br>
> > > > <<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>><br>
> > > > Sent: Friday, September 30, 2016 9:15:04 AM<br>
> > > > Subject: Re: Dht readdir filtering out names<br>
> > > ><br>
> > > > On Fri, Sep 30, 2016 at 9:13 AM, Raghavendra Gowdappa <<br>
> > > <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>><br>
> > > > wrote:<br>
> > > ><br>
> > > > > dht_readdirp_cbk has different behaviour for directories and files.<br>
> > > > ><br>
> > > > > 1. If file, pick the dentry (passed from subvols as part of readdirp<br>
> > > > > response) if the it corresponds to data file.<br>
> > > > > 2. If directory pick the dentry if readdirp response is from<br>
> > > hashed-subvol.<br>
> > > > ><br>
> > > > > In all other cases, the dentry is skipped and not passed to higher<br>
> > > > > layers/application. To elaborate, the dentries which are ignored are:<br>
> > > > > 1. dentries corresponding to linkto files.<br>
> > > > > 2. dentries from non-hashed subvols corresponding to directories.<br>
> > > > ><br>
> > > > > Since the behaviour is different for different filesystem objects,<br>
> > > > > dht<br>
> > > > > needs ia_type to choose its behaviour.<br>
> > > > ><br>
> > > > > ----- Original Message -----<br>
> > > > > > From: "Pranith Kumar Karampuri" <<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>><br>
> > > > > > To: "Shyam Ranganathan" <<a href="mailto:srangana@redhat.com" target="_blank">srangana@redhat.com</a>>, "Raghavendra<br>
> > > Gowdappa" <<br>
> > > > > <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>>, "Nithya Balachandran"<br>
> > > > > > <<a href="mailto:nbalacha@redhat.com" target="_blank">nbalacha@redhat.com</a>><br>
> > > > > > Cc: "Gluster Devel" <<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>><br>
> > > > > > Sent: Friday, September 30, 2016 8:39:28 AM<br>
> > > > > > Subject: Dht readdir filtering out names<br>
> > > > > ><br>
> > > > > > hi,<br>
> > > > > > In dht_readdirp_cbk() there is a check about skipping files<br>
> > > > > without<br>
> > > > > > ia_type. Could you help me understand why this check is added?<br>
> > > > > > There<br>
> > > are<br>
> > > > > > times when users have to delete gfid of the entries and trigger<br>
> > > something<br>
> > > > > > like 'find . | xargs stat' to heal the gfids. This case would fail<br>
> > > if we<br>
> > > > > > skip entries without gfid, if the lower xlators don't send stat<br>
> > > > > information<br>
> > > > > > for them.<br>
> > > > ><br>
> > > > > Probably we can make readdirp_cbk not rely on ia_type and pass _all_<br>
> > > > > dentries received by subvols to application without filtering.<br>
> > > > > However<br>
> > > we<br>
> > > > > should make this behaviour optional and use this only for recovery<br>
> > > setups.<br>
> > > > > If we don't rely on ia_type (during non error scenarios),<br>
> > > > > applications<br>
> > > end<br>
> > > > > up seeing duplicate dentries in readdir listing.<br>
> > > > ><br>
> > > ><br>
> > > > That means dht_readdir() gives duplicate entries? As per the code it<br>
> > > seems<br>
> > > > like it...<br>
> > ><br>
> > > No. It follows the filtering logic of "pick dentry only from hashed<br>
> > > subvol". This logic doesn't need ia_type. Now, that you brought the topic<br>
> > > of dht_readdir, I've another solution for your use case (Basically don't<br>
> > > use readdirp :) ):<br>
> > ><br>
> > > 1. mount glusterfs with "--use-readdirp=no" option.<br>
> > > 2. disable md-cache/stat-prefetch as it converts all readdir calls into<br>
> > > readdirp calls<br>
> > ><br>
> ><br>
> > Probably the ones in dht as well? i.e. use-readdirp option.<br>
><br>
> No. dht doesn't convert a readdir into readdirp. The option you are referring<br>
> to might be "readdir-optimize" which is something different.<br>
<br>
</div></div>Sorry. I was wrong. There is an option in dht too, to force using readdirp. As you said, we should disable that too.<br>
<div><div><br>
><br>
> ><br>
> ><br>
> > ><br>
> > > Use this only for recovery setups :).<br>
> > ><br>
> > > ><br>
> > > ><br>
> > > > ><br>
> > > > > ><br>
> > > > > > --<br>
> > > > > > Pranith<br>
> > > > > ><br>
> > > > ><br>
> > > > > regards,<br>
> > > > > Raghavendra<br>
> > > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > > Pranith<br>
> > > ><br>
> > ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Pranith<br>
> ><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><span data-mce-style="color: #888888;" style="color: #888888;">-- <br><div><div dir="ltr">Pranith<br></div></div>
</span></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</div>
</blockquote><div><br></div></div></body></html>