File System — Important Data Structure

Arunkumar Krishnan
1 min readMay 20, 2021

--

As discussed in earlier post we know that File System is an organized way to access huge information/data stored in permanent storage devices. To retrieve meaning of the raw data from the storage device, we need a FS.
In this we post we will discuss some of the important data structures used in UNIX based file system.

i-node (index node):

The core structure storing all the metadata about the file and details of where actual data can be found. There are 2 types of i-node: Disk inode and Incore inode

Disk inode:

Their size is always chosen to be exactly same size of the OS Block size. This will ensure a smooth transfer (load/update) of i-nodes from secondary storage.
It typically holds:

  • Metadata of file: (owner details, file type (directory or normal), access permissions, access times (created, last accessed, last modified), links count for the file, file size)
  • List of pointer (disk addresses stored as LBAs) to the the data blocks

Incore inode (residing in memory):
It holds every information of the disk i-node along with some additional information like

  • status of the in-core inode
  • inode number
  • reference count
  • pointers to other in-core inodes (used mainly for easy navigation during allocation of inodes)

--

--

No responses yet