<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 9:13 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">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 response) if the it corresponds to data file.<br>
2. If directory pick the dentry if readdirp response is from hashed-subvol.<br>
<br>
In all other cases, the dentry is skipped and not passed to higher 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, dht needs ia_type to choose its behaviour.<br>
<span class=""><br>
----- Original Message -----<br>
> From: "Pranith Kumar Karampuri" <<a href="mailto:pkarampu@redhat.com">pkarampu@redhat.com</a>><br>
> To: "Shyam Ranganathan" <<a href="mailto:srangana@redhat.com">srangana@redhat.com</a>>, "Raghavendra Gowdappa" <<a href="mailto:rgowdapp@redhat.com">rgowdapp@redhat.com</a>>, "Nithya Balachandran"<br>
> <<a href="mailto:nbalacha@redhat.com">nbalacha@redhat.com</a>><br>
> Cc: "Gluster Devel" <<a href="mailto:gluster-devel@gluster.org">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 without<br>
> ia_type. Could you help me understand why this check is added? There are<br>
> times when users have to delete gfid of the entries and trigger something<br>
> like 'find . | xargs stat' to heal the gfids. This case would fail if we<br>
> skip entries without gfid, if the lower xlators don't send stat information<br>
> for them.<br>
<br>
</span>Probably we can make readdirp_cbk not rely on ia_type and pass _all_ dentries received by subvols to application without filtering. However we should make this behaviour optional and use this only for recovery setups. If we don't rely on ia_type (during non error scenarios), applications end up seeing duplicate dentries in readdir listing.<br></blockquote><div><br></div><div>That means dht_readdir() gives duplicate entries? As per the code it seems like it...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> --<br>
> Pranith<br>
><br>
<br>
regards,<br>
Raghavendra<br>
</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>