Inode table

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Jan 13 14:12:50 UTC 2005


On Wed, Jan 12, 2005 at 09:32:23PM -0500, David Kreuter wrote:
> A few questions on the inode table in memory. Is the inode table in 
> contiguous memory per file system? Or is it a linked list or some other 
> data construct? Does it matter in the sense thats it's an abstraction 
> and could be described as a contiguous table?  Is the contruct different 
> based on linux distro?
> Or is it always bolted in memory from,  say, the always in core inode 
> for root of the filesystem?
> Different based on file system?
> Realizing that the disk structure are different.

Each type of filesystem uses it's own layout for the filesystem
metadata.  ext2 and ext3 being a bit of an exception since they share
the majority of the disk layout, with ext3 just using an extra file in a
special way and maintaining directories in a more strict but backwards
compatible way.

I suspect most filesystems have a continuous chunk for their inode table
(I think that is what the superblock is for, or at least it has a
pointer to the inode blocks if nothing else, and of course is duplicated
multiple times on the disk, just in case.) and most of the unix type
filesystems use cylinder groups to spread the data across the disk while
trying to minimize file level fragmentation.

The main difference between filesystems is really how they keep track of
files and hence store that meta data in the filesystem.  Storing the
actual data everyone does the same.  Data goes onto the disk somewhere a
block at a time, usually cintoguous blocks if possible, and then some
table of block numbers is stored in the meta data (in the inode is
equivalant).  Directories are then files that store filename to inode
mappings.  Multiple filenames can point to the same inode (hardlinks),
and special filetypes without an inode can be created too (character and
block devices, pipes, symlinks, etc).

Not sure that really answered your question.  Hopefully it was still
interesting.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list