Every file system is a little different, but the basic ideas are similar. I’ll be describing a very rough version of a (logical) Unix filesystem. • Filesystems are broken up into blocks • Blocks are the smallest unit of data that the filesystem deals with
blocks • inode blocks (metadata) • inode blocks represent files (or directories). • Every inode has a unique inode number • A file inode holds all the metadata for that file, as well as pointers on disk to all the data blocks for that file (one possibility, could also be a linked list)
count of 4, meaning that there are four directory listings somewhere in the filesystem referencing it. • Whenever a file is deleted, it’s inode count is decremented. When the count reaches 0, the data is freed.
of inode that references a path • Alternately a special entry in a directory listing • Paths can usually be relative or absolute • Symlinks are separate files from the files they point to • Most system calls read through symlinks by default (act as if they were called on the file the symlink points to)