Extended File System
Extended File System
Limitations in Ext
• Some problems with the Ext filesystem
Filesystem Comparison
Filesystem
Comparison
Minix Ext Xia Ext2
Maximal FS size 64MB 2GB 2GB 4TB
Maximal filename 14/30 chars 255 chars 248 chars 255 chars
Extensible? no no no yes
Common concepts
• Files are represented by inodes
Inodes
• A structure that contains file’s description:
– Type
– Access rights
– Owners
– Timestamps
– Size
Directories
• These are structured in a tree hierarchy
Influenced by BSD FFS.Every partition is divided into a number of block groups,corresponding to the cylinder
groups of FFS,with each block group holding a copy of superblock,inode and data blocks.
STRUCTURE OF EXT2FS
What is the basic idea of block groups ?
The physical superblock contains information on the number of inodes,blocks per block groups,time of last
mount,last write to sb,mount counter,maximum mount operations.Padded to a size of 1k bytes.
Block group descriptors:Information on block groups.Each block group is described by a 32 byte
desc.Contains block numbers in the inode bitmap,block bitmap and inode table,number of free
inodes,number of free blocks,number of directories in this block group.
z VFS goes further, allowing the sysadmin to mount any of a set of logical file systems on any physical device
z Logical file systems promote compatibility with other operating system standards permitting developers to
implement file systems with different policies
z VFS abstracts details of physical device and logical file system allowing processes to access files using a
common interface, without knowing what physical or logical system the file resides on
FEATURES OF UNIX FILE SYSTEMS
Boot Block : Will it always be present?
VFS responsible for calling file-system specific implementations. How does VFS know which filesystems are
configured?
struct file_system_type {
– Int fs_flags;
– #endif
– };
Mounting
Any file system in UNIX must be mounted before it can be accessed,either through mount() or mount_root().
What is mount_root() ?
It is initialized by the function “read_super” in the VFS.It interrogates floppy disks,CD-ROM for a change of
media,tests if superblock is present and if so returns it.else it calls the fs-specific function to create a
superblock.
File system specific Read_super() reads its data from the block device using the LINUX cache
functions,bread,brw_page.Processes may be put to sleep when reading/writing or mounting file systems.
PROC FILE SYSTEM
Every process has a directory in /proc/pid which contains files relevant to the process.
VFS function read_super( ) is called by do_mount( ) and in turn calls proc_read_super( ) for the proc file
system.
. , .. , loadavg,uptime,meminfo,kmsg,version,pci,cpuinfo,self,ioports,profile.