<p>
        Hi <span style="white-space:normal;">Geneviève,</span> 
</p>
<p>
        Sorry for bothering you again for this problem.
</p>
Here is a brief description of the problem we encountered.<br>
We are going to build a Linux data collector based on lttng. In some scenarios, the Linux server will perform a lot of file creation and deletion operations. At this time, a hashmap that stores file nodes in our collecotor will explode as the number of files increases. Therefore, we need to remove those file nodes that have been deleted in the hashmap in time.<br>
At first, we wanted to know whether a file node still exists by finding the correspondence between file name and inode in lttng  trace data.  If the file has been deleted, its corresponding inode number cannot be obtained through its filename.Then, we want to find the mapping from file names to corresponding inode in lttng trace data.So I sent you this email.<br>
<p>
        But it seems that this correspondence cannot be obtained from the lttng trace data, so we are now taking another method to know whether a file node has been deleted through the trace data of unlink or unlinkat sys.
</p>
<p>
        Do you have any suggestions on this question?
</p>
<p>
        thanks,
</p>
<p>
        yuhua.
</p>
<br>
<br>
<blockquote name="replyContent" class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0;">
        -----原始邮件-----<br>
<b>发件人:</b><span id="rc_from">"Genevieve Bastien" <gbastien@versatic.net></span><br>
<b>发送时间:</b><span id="rc_senttime">2020-05-11 21:53:43 (星期一)</span><br>
<b>收件人:</b> "熊毓华" <xiongyuhua@zju.edu.cn><br>
<b>抄送:</b> <br>
<b>主题:</b> Re: [lttng-dev] questions about mapping from file names to corresponding inode<br>
<br>
        <p>
                Hi Yuhua,
        </p>
        <p>
                What are you trying to achieve exactly with this data? I've been
      looking around this area recently.
        </p>
        <p>
                We wanted to be able to match requests to disk (block_rq/bio)
      with the writes to file from the various threads. I looked at the
      block_dirty_buffer event, as well as writeback_dirty_page. For the
      block, the dirty buffers are by partition, while the requests are
      for the device. There is an event (block_bio_remap) that should
      map the sector from the partition to the sector from the device,
      but I found no later block requests that included those sectors.
      I've thus put this investigation on pause for now.
        </p>
        <p>
                That may not be related to what you're doing, but just in case,
      I'm sharing my experience with writes to block requests mappings.
        </p>
        <p>
                Cheers,
        </p>
        <p>
                Geneviève
        </p>
        <p>
                <br>
        </p>
        <div class="moz-cite-prefix">
                On 5/7/20 1:23 AM, 熊毓华 via lttng-dev
      wrote:<br>
        </div>
        <blockquote type="cite" cite="mid:1bb0377a.88648.171ed966cd8.Coremail.xiongyuhua@zju.edu.cn">
                Hi,<br>
<br>
I want to know whether lttng trace data will provide mapping from
      file names to corresponding inode.<br>
<br>
I refered some data parsed by babeltrace,and found that internal
      kernel tracepoints like
      writeback_dirty_inode_start、jbd2_submit_inode_data and
      lttng_statedump_vm_map can provide inode parameter.But I don’t
      know the meaning of these tracepoints mentioned above, and it
      seems to have little to do with the mapping we need.I want to know
      which tracepoint will record the mapping.<br>
<br>
In addition, I found the get_inode_from_fd() function at <a href="https://github.com/lttng/lttng-modules/blob/master/src/probes/lttng-uprobes.c" target="_blank" moz-do-not-send="true">lttng-uprobes.c</a>.It
      seems to provide some hints, can this function provide the mapping
      information we want?If so, how should I use it to get the data.<br>
<br>
                <p>
                        Looking forward to your reply.
                </p>
                <p>
                        <br>
                </p>
                <p>
                        thanks,
                </p>
                <p>
                        yuhua
                </p>
                <p>
                        <br>
                </p>
                <div style="font-size:14px;white-space:normal;">
                        <br>
------------------<br>
Yuhua Xiong<br>
Lab for Internet and Security Technology<br>
School of Computer Science and Technology<br>
Zhejiang University<br>
Hangzhou, 310007, P.R. China<br>
                </div>
<br>
                <fieldset class="mimeAttachmentHeader">
                </fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
lttng-dev mailing list <a class="moz-txt-link-abbreviated" href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a> <a class="moz-txt-link-freetext" href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a> </pre>
        </blockquote>
</blockquote>