On Mon, 17 Jul 2000, Mark Weaver wrote:

> Date: Mon, 17 Jul 2000 13:34:40 -0400
> From: Mark Weaver <[EMAIL PROTECTED]>
> To: Expert Linux List' <[EMAIL PROTECTED]>
> Subject: [expert] Inodes...
> 
> I wonder if someone could tell me what they are. This may sound a little
> silly, but it's something that's been on my mind the last couple of
> days. It strikes me that they might be the Linux equivalant of an MS
> cluster. Is that right?


>From what I can scavenge out of ext2fs.h and some experience, Inodes are
the basic building blocks for the ext2 and similarly structured
filesystems. Each ext2 indoe has the following entries: file mode, owner
uid, size in bytes, access time, creation time, modification time,
deletion time, group id, links count, blocks count, file flags, directory
acl, fragment address. Normally, large files can be split across multile
inodes, if you do a 'stat filename' you can get the inode number of the
file, the blocks of inodes used, and how many links are refererencing to
it. An inode can be a directory, a named pipe, a device file(linked to the
kernel) and even a network socket(i think). The link count to the inode is
a way of telling whether or not it is free. In C, if you delete a file,
you must first unlink() it, that sets the link sounter to 0, meaning
deleted, if the link count was 1. The only way I can remember to make the
link counter not equal to 1, is if that file is a directory, or a hard
link is made to it. If you are at all interested in filesystems, inodes
are the way that ext2 works. However, if you wish to deal with something
like Reiserfs, you are looking at a Balanced tree algorithm, where the
files themselves are stored in the tree.

-- 
Regards,

Ellick Chan
[EMAIL PROTECTED]
Jul 17


Reply via email to