In Ode
In Ode
- each (unix) file system has its own inode table; on disk each
cylinder group will hold a relevant part of that table
- each inode is referenced by a "device + inode number" pair
- each file is assigned an inode number which is unique within
that file system; each directory structure will consist of a list of
"filename + inode number" pairs; inodes won't hold filenames
Mode (file type and permissions) - reserved inode numbers: 0, 1, 2
0: deleted files/directories
Link count 1: (fs dependent) file system creation time/bad blocks count/.....
2: refers to the root directory of the file system
Owner's UID number - the "mode" field will always be the first field in the inode;
the order of the other fields is file system dependent
- timestamps: in seconds since 00:00:00 GMT 01-01-1970
Owner's GID number
- access time: updated after each read/write of file
- modification time: updated after each write to file
File size in bytes - inode change time: updated after each modification of one of
the fields in the inode (chmod, chown, chgrp, ln, ...)
Time file was last accessed - triple indirect pointer: use is fs and max.file size dependent
- status/flags like "compress file" or "do not update access time"
Time file was last modified or "do not extend file" are file system dependent
- extra fields may hold: an inode generation number (for NFS)
Time inode was last changed and/or ACL info (sometimes this field contains a "continuation
inode number": a pointer to a special inode that holds ACL info)
1 data block and/or a file type identification (for device files: major and minor
12 direct block pointers
(8KB) number; for directories: inode number of parent directory);
(32/64 bits each)
per pointer all extra/reserved fields are file system dependent!
to reference up to 96KB
1 data block 1 data block
1 single indirect block pointer (8KB) (8KB)
2048 direct pointers 2048 direct pointers
(32/64 bits) to reference up to 16MB per pointer per pointer