<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 30, 2014 at 12:43 PM, Anoop C S <span dir="ltr">&lt;<a href="mailto:anoopcs9@gmail.com" target="_blank">anoopcs9@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br>
On 07/30/2014 12:29 PM, Raghavendra Gowdappa wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
----- Original Message -----<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
From: &quot;Jiffin Thottan&quot; &lt;<a href="mailto:jthottan@redhat.com" target="_blank">jthottan@redhat.com</a>&gt;<br>
To: <a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a><br>
Sent: Wednesday, July 30, 2014 12:22:30 PM<br>
Subject: [Gluster-devel] When  inode table is populated?<br>
<br>
Hi,<br>
<br>
When we were trying to call rename from translator (in reconfigure) using<br>
STACK_WIND , inode table(this-&gt;itable) value seems to be null.<br>
<br>
Since inode is required for performing rename, When will inode table gets<br>
populated and Why it is not populated in reconfigure or init?<br>
</blockquote>
Not every translator has an inode table (nor it is required to). Only the translators which do inode management (like fuse-bridge, protocol/server, libgfapi, possibly nfsv3 server??) will have an inode table associated with them.</blockquote>
</div></blockquote><div><br>I was not entirely correct when I made the above statement. Though inode management is done by above said (fuse-bridge, server, libgfapi etc) translators, inode tables are _not associated_ with them (with nfsv3 server as exception which has inode table associated with it).<br>
<br>For a client (fuse-mount, libgfapi etc), the top level xlator (in the graph) has the inode table. If you had used --volume-name option on client, the value (which is an xlator name) specified will be set as top. Otherwise, whatever happens to be the topmost xlator is set as the top. Usually this is one of acl, meta, worm etc (please refer to the code - graph.c, which is the &quot;first&quot; xlator in graph).<br>
<br></div><div>On the brick process, itables are associated with any of the xlators &quot;bounded&quot; to the protocol/server. The concept of bounded-xlator was introduced so that clients have the flexibility to connect to any xlator (based on what functionality it wants) in the server graph. Bounded xlators of a server are specified through &quot;option subvolumes&quot; in a brick volfile. IIRC, we can have multiple bound xlators for a single protocol/server (though in the volfiles we generate using gluster-cli we use only one).<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 If you need to access itable, you can do that using inode-&gt;table. <br></blockquote></div></blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

</blockquote>
<br></div>
Here the old location was created by assigning a fixed gfid using STACK_WIND (mkdir) from translator [notify ( )]. And inode was null inside its cbk function. Thus old location doesn&#39;t have an inode value.</blockquote>

<div><br></div><div>I hope you are speaking in the context of trash translator and probably you want to create a &quot;.trash&quot; directory in each of the brick. It would be a bit tricky if you  want to initiate an mkdir fop from notify of an xlator. For mkdir, pargfid, name and inode members of loc_t structure have to be populated. The inode would be a new inode (got by calling inode_new ()). But we need a pointer to itable to pass as an argument to inode_new(). Based on whether you are loading trash translator in client or server, you can access itable using the explanation given above.<br>

<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br>
<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Or should we create a private inode table and generate inode using it?<br></blockquote></blockquote></div></blockquote><div><br></div><div>This means your &quot;.trash&quot; directory wouldn&#39;t be accessible through standard inode resolution code in fuse-bridge/libgfapi/server. In short I would advise you not to use a private inode-table, though probably you can make it work through some hacks.<br>
 <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Jiffin<br>
______________________________<u></u>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://supercolony.gluster.<u></u>org/mailman/listinfo/gluster-<u></u>devel</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://supercolony.gluster.<u></u>org/mailman/listinfo/gluster-<u></u>devel</a><br>
</blockquote>
<br></div><span><font color="#888888">
-- <br>
Anoop C S<br>
<a href="tel:%2B91%20740%20609%208342" value="+917406098342" target="_blank">+91 740 609 8342</a></font></span><div><div><br>
<br>
______________________________<u></u>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://supercolony.gluster.<u></u>org/mailman/listinfo/gluster-<u></u>devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Raghavendra G<br>
</div></div>