On Sat, 6 Nov 1999, Jeff Garzik wrote:

> When does an inode enter, and leave the inode cache?  (ie. at what VFS
> entry points)

VFS doesn't create inodes. Only filesystems do. Leaving icache is a bit
more complicated - inode gets out if the last reference had been killed.
Normally it's dput() that calls iput(). However, icache acts as a
secondary cache - inode is released immediately only if it's unhashed or
i_nlink is 0 (at the moment of last iput(), that is). Otherwise it is
thrown out only when the memory pressure comes. In any case
->clear_inode() is called before releasing the thing. Moreover, there is a
mechanism allowing filesystem code to keep shadow references to inodes.
That is, hold private data structures that contain references to inodes
_and_ do not affect inode releasing policy. Look through fsdevel archives
- I've posted a description back in Spring (subject was something a-la
'how to deal with filesystems with jumping inode pieces').

> I am interested in keeping inode data either in the inode cache, OR the
> backing store, but not both.

Details, please. If you are talking about procfs - keep in mind that we
may have multiple mounts.

Reply via email to