The inode is a data structure that describes a file. The inode is actually a structure on filesystem. To open a file, the kernel copies the inode into memory. As the file changes, the in-core inode is updated usually more often than the on-disk copy. And the in-core inode has a few extra fields that are only needed while the file is opened. This over-simplifies things a little bit, but I think it's enough for now. ----lok!------
Basically the question has been answered. I would like to add in some of my views.
In - core inode refers to inode which is present in the main memory.The kernel uses it whenever a process wants to manipulate a file in the secondary memory.It is a dynamic entity.
On- disk inode is a static entity & is present only in the Secondary memory.
The inode is a data structure that describes everything about a file other than their name. When a file is opened then the kernel copies the inode into memory. As the file changes, the in-core inode is updated usually more often than the on-disk copy. And the in-core inode has a few extra fields that are only needed while the file is opened.
发布评论
评论(4)
来自 http://www.cs.iastate.edu/~cs554/NOTES/RPC/UNIXfilesystem .pdf(第3页):
From http://www.cs.iastate.edu/~cs554/NOTES/RPC/UNIXfilesystem.pdf (3rd page):
索引节点是描述文件的数据结构。 inode实际上是文件系统上的一个结构。要打开文件,内核会将索引节点复制到内存中。随着文件的更改,核心 inode 的更新通常比磁盘副本更频繁。核心 inode 有一些额外的字段,仅在文件打开时才需要。这有点过于简单化了,但我认为现在就足够了。
----乐!------
The inode is a data structure that describes a file. The inode is actually a structure on filesystem. To open a file, the kernel copies the inode into memory. As the file changes, the in-core inode is updated usually more often than the on-disk copy. And the in-core inode has a few extra fields that are only needed while the file is opened. This over-simplifies things a little bit, but I think it's enough for now.
----lok!------
基本上问题已经得到解答了。我想补充一些我的看法。
核心inode是指存在于主存中的inode。每当进程想要操作辅助存储器中的文件时,内核就会使用它。它是一个动态实体。
磁盘上的索引节点是一个静态实体仅存在于辅助存储器中。
华泰
Basically the question has been answered. I would like to add in some of my views.
In - core inode refers to inode which is present in the main memory.The kernel uses it whenever a process wants to manipulate a file in the secondary memory.It is a dynamic entity.
On- disk inode is a static entity & is present only in the Secondary memory.
HTH
” 核心 Inode 和磁盘 Inode 之间的区别
inode 是一种数据结构,它描述文件除名称之外的所有内容。
当打开文件时,内核会将索引节点复制到内存中。当文件发生变化时,
核心 inode 的更新通常比磁盘副本更频繁。核心 inode 有一些额外的字段,仅在文件打开时才需要。
" Difference between in-core Inode and disk Inode
The inode is a data structure that describes everything about a file other than their name.
When a file is opened then the kernel copies the inode into memory. As the file changes, the
in-core inode is updated usually more often than the on-disk copy. And the in-core inode has a few extra fields that are only needed while the file is opened.