<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 7:03 PM, Pranith Kumar Karampuri <span dir="ltr">&lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">hi,<br>
    I work on glusterfs and was debugging a memory leak. Need your help in figuring out if something is done properly or not.<br>
When a file is looked up for the first time in gluster through fuse, gluster remembers the parent-inode, basename for that inode. Whenever an unlink/rmdir/(lookup gives ENOENT) happens then corresponding forgetting of parent-inode, basename happens.</blockquote>
<div><br></div><div>This is because of the path resolver explicitly calls d_invalidate() on a dentry when d_revalidate() fails on it.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 In all other cases it relies on fuse to send forget of an inode to release these associations. I was wondering what are the trigger points for sending forgets by fuse.<br>
<br>
Lets say M0, M1 are fuse mounts of same volume.<br>
1) Mount &#39;M0&#39; creates a file &#39;a&#39;<br>
2) Mount &#39;M1&#39; of deletes file &#39;a&#39;<br>
<br>
M0 never touches &#39;a&#39; anymore. Will a forget be sent on inode of &#39;a&#39;? If yes when?<br></blockquote><div><br></div><div>Really depends on when the memory manager decides to start reclaiming memory from dcache due to memory pressure. If the system is not under memory pressure, and if the stale dentry is never encountered by the path resolver, the inode may never receive a forget. To keep a tight utilization limit on the inode/dcache, you will have to proactively <span style="color:rgb(0,0,0)">fuse_notify_inval_entry on old/deleted files.</span></div>
<div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Thanks</span></div></div></div></div>