Next  Contents  Prev

Inodes





Notes:

To quote from “ xt2.txt” in the source directory of Linux or this link http://www.linuxhq.com/kernel/v2.4/doc/filesystems/ext2.txt.html

“The inode (index node) is the fundamental concept in the ext2 filesystem. Each object in the filesystem is represented by an inode. The inode structure contains pointers to the filesystem blocks which contain the data held in the object and all of the metadata about an object except its name. The metadata about an object includes the permissions, owner, group, flags, size, number of blocks used, access time, change time, modification time, deletion time, number of links, fragments, version (for NFS) and ACLs. There are several reserved fields which are currently unused in the inode structure and several which are overloaded. One field is used for the directory ACL if the inode is a directory and for the top 32 bits of the file size if the inode is a regular file. The translator field is unused under Linux, but is used by the HURD to reference the inode of a program which will be used to interpret this object. The HURD also has larger permissions, owner and group fields, so it uses some of the other unused by Linux fields to store the extra bits. There are pointers to the first 12 blocks which contain the file's data in the inode. There is a pointer to an indirect block (which contains pointers to the next set of blocks), a pointer to a doubly-indirect block (which contains pointers to indirect blocks) and a pointer to a trebly-indirect block (which contains pointers to doubly-indirect blocks). The flags field contains some ext2-specific flags which aren't catered for by the standard chmod flags. These flags can be listed with lsattr and changed with the chattr command. There are flags for secure deletion, undeletable, compression, synchronous updates, immutability, append-only, dumpable, no-atime, and btree directories. Not all of these are supported yet.”



Next  Contents  Prev