<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On May 31, 2017 6:15 PM, "Yubin Ruan" <<a href="mailto:ablacktshirt@gmail.com">ablacktshirt@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On Wed, May 31, 2017 at 01:30:59PM -0400, Rik van Riel wrote:<br>
> On Wed, 2017-05-31 at 21:37 +0800, Yubin Ruan wrote:<br>
> > I notice that there is a <br>
> > <br>
> > unsigned long i_ino;<br>
> ><br>
> > in definition of `struct inode' [1], which is the virtual filesystem<br>
> > inode.<br>
> > Does that mean "inode number" and is it used for indexing in the<br>
> > system-wide<br>
> > inode table? <br>
> ><br>
> > If that is the case, would that limit the number of open file in<br>
> > Linux?<br>
><br>
> Those numbers are unrelated.<br>
><br>
> The i_ino number is the inode number within each<br>
> filesystem, and different filesystems can have<br>
> inodes with the same inode numbers.<br>
<br>
</div>Regarding to inode number, I notice that nearly every filesystem has tree<br>
representation of the inode number:<br>
1. on-disk inode number<br>
2. in-memory inode number<br>
3. VFS inode number<br>
How are these related? I mean, if they are all the same, then if filesystem A<br>
and filesystem B both have some identical inode number, the VFS inode numbers<br>
will conflict.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Why does it matter ? You don't access inode numbers directly. It always accessed through a path and that uniquely identifies the inode number based on the mounted filesystem. Generally clients like nfs use a file handle which has the filesystem id embedded in it.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#888888"><br>
Yubin<br>
</font><div class="quoted-text"><br>
> File descriptors (open files) point to a struct inode<br>
> somewhere in memory. The same file can be opened many<br>
> times (all programs opening libc.so). Many files will<br>
> not be opened by any program at all.<br>
<br>
</div><div class="elided-text">______________________________<wbr>_________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.<wbr>org</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.<wbr>org/mailman/listinfo/<wbr>kernelnewbies</a><br>
</div></blockquote></div><br></div></div></div>