From mboxrd@z Thu Jan 1 00:00:00 1970 From: riel@surriel.com (Rik van Riel) Date: Wed, 31 May 2017 13:30:59 -0400 Subject: Is vnode number also limit system-wide number of open file? In-Reply-To: <20170531133754.GA9534@HP> References: <20170531133754.GA9534@HP> Message-ID: <1496251859.29205.90.camel@surriel.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, 2017-05-31 at 21:37 +0800, Yubin Ruan wrote: > I notice that there is a? > ???? > unsigned long i_ino; > > in definition of `struct inode' [1], which is the virtual filesystem > inode. > Does that mean "inode number" and is it used for indexing in the > system-wide > inode table?? > > If that is the case, would that limit the number of open file in > Linux? Those numbers are unrelated. The i_ino number is the inode number within each filesystem, and different filesystems can have inodes with the same inode numbers. File descriptors (open files) point to a struct inode somewhere in memory. The same file can be opened many times (all programs opening libc.so). Many files will not be opened by any program at all. -- All Rights Reversed. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: This is a digitally signed message part Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170531/e88422ec/attachment.bin