Ext4 Features
Ext4 Features
EXT4 features
2.1. Compatibility
Any existing Ext3 filesystem can be migrated to Ext4 with
an easy procedure which consists in running a couple of
commands in read-only mode (described in the next
section). This means that you can improve the performance,
storage limits and features of your current filesystems
without reformatting and/or reinstalling your OS and
software environment. If you need the advantages of Ext4
on a production system, you can upgrade the filesystem.
The procedure is safe and doesn't risk your data (obviously,
backup of critical data is recommended, even if you aren't
updating your filesystem :). Ext4 will use the new data
structures only on new data, the old structures will remain
untouched and it will be possible to read/modify them when
needed. This means, that, of course, that once you convert
your filesystem to Ext4 you won't be able to go back to Ext3
again (although there's a possibility, described in the next
section, of mounting a Ext3 filesystem with Ext4 without
using the new disk format and you'll be able to mount it
with Ext3 again, but you lose many of the advantages of
Ext4).
2.4. Extents
The traditionally Unix-derived filesystems like Ext3 use a
indirect block mapping scheme to keep track of each block
used for the blocks corresponding to the data of a file. This
is inefficient for large files, specially on large file delete and
truncate operations, because the mapping keeps a entry for
every single block, and big files have many blocks -> huge
mappings, slow to handle. Modern filesystems use a
different approach called "extents". An extent is basically a
bunch of contiguous physical blocks. It basically says "The
data is in the next n blocks". For example, a 100 MB file can
be allocated into a single extent of that size, instead of
needing to create the indirect mapping for 25600 blocks (4
KB per block). Huge files are split in several extents.
Extents improve the performance and also help to reduce
the fragmentation, since an extent encourages continuous
layouts on the disk.