Re: inode cache implementation

From: Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Date: Fri Mar 31 2000 - 08:34:11 EST


  Hello.

> I am trying to trace a file read to understand how the
> inode cache comes in to the picture. I know how it is
> suppose to operate but I do not know how the inode cache
> fits in the implementation.
>
> Kerner version: 2.0.33
> FS:ext2
  Maybe you had better to study some more recent kernel - filesystems
changed significantly against 2.0 and 2.2 respectively 2.3.

> I can trace the call to fs/buffer.c/generic_readpage() routine
> where VFS(?) calls bmap->ext2_bmap to read the inode. In ext2_bmap
  No. ext2_bmap has to tell the buffer_cache(/page_cache in newer
kernels) where given offset in file lies on disk. Inode is read
by ext2_read_inode() (in ext2/inode.c) which is is called from iget().
So following questions are irrelevant.
  I think you might have bad idea what inodes are. Inode is the thing
that lies on disk and which keeps metadata of file - access times, size
of file, permissions and also references to blocks with data (through some
references are also kept in indirect blocks). There is one inode per file
(OK, this depends of what you consider as a file.. We have such things as
hardlinks and so on..).

                                                        Honza

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:29 EST