From: Stephen Tweedie <sct@dcs.ed.ac.uk>
Newsgroups: comp.os.linux.announce
Subject: Ext2fs vs xiafs : Official comparison
Date: 13 May 1993 02:12:49 +0300
Approved: linux-announce@tc.cornell.edu (Lars Wirzenius)
Message-ID: <1ss09hINNajd@hydra.Helsinki.FI>

                   Filesystems - the Next Generation
                 The Great Debate: XIAFS versus EXT2FS
                 =====================================

In the light of recent requests for information comparing the second
generation Linux filesystems (xiafs and ext2fs), I have prepared an
"official" comparison document.  This file has been prepared in
conjunction with, and with the approval of, all of the developers of
xiafs and ext2fs.

	Stephen Tweedie <Stephen.Tweedie@dcs.ed.ac.uk>.


History:
========

The original Linux filesystem was a simple copy of the Minix operating
system's own filesystem.  It inherited minix's restrictions of 14
character filenames and 64MB partitions, but has since been enhanced to
support filenames of up to 30 characters.  It is the oldest and most
trusted of the Linux filesystems.

In an effort to lift the filename and partition restrictions of the
Minix fs, Remy Card developed the extfs.  This supports 4GB files and
partitions, and 255-char filenames.  Unfortunately, it uses a linked
list to hold its free block and free inode information; this is slightly
more memory-efficient than using a bitmap, but is a lot more prone to
fragmentation.  Performance of the extfs drops seriously after a
partition has been used for a while.  The linked-list technique is now
acknowledged to be a bad idea, although extfs is still very useable if
the partition is defragmented regularly.

Within a couple of weeks of each other, the xiafs and ext2fs filesystems
were announced on an unsuspecting public.  Chaos has reigned ever since.

Xiafs and ext2fs were both intended to provide fast and efficient
alternative filesystems which did not suffer from the performance
problems of the extfs or the restrictions of the minix fs.


Overview:
=========

xiafs was based closely on the original minix fs code, but enhanced to
be both faster and less restrictive.  ext2fs was a more ambitious effort
which was designed to add new features and to take filesystems a step
forward.  It has taken longer to debug ext2fs; they are *probably* both
bug-free now, but xiafs has been a stable beta release for a lot longer.
They both have good support for bad-block mapping.

The biggest difference between the two filesystems is in their design
philosophy.  Both filesystems were originally designed to fill the basic
requirements of speed and capacity.  However, beyond this, the priority
for xiafs was to change as little as possibly of the minix fs, and so to
produce a stable filesystem; whereas ext2fs was designed from the start
to have room to expand.

The net effect is that the xiafs kernel code has had no bugs reported
since mid-February, whereas the ext2fs code has taken significantly
longer to debug.  The ext2fs is now in stable beta release.  It has had
much less time to prove its reliability in this state than xiafs; but
you get more functionality out of ext2fs.  This is the crux of the
choice between the two.

Looking to the future, ext2fs has much more room to expand in than
xiafs.  There are several significant enhancements planned to ext2fs,
and users will be able to take advantage of the new systems without
reformatting any of their old ext2fs partitions.  Upgrades either
planned or under development include transparently compressed files,
POSIX-style access control features, undeletion of lost files and
fragments (a technique for reducing the disk usage overheads especially
for for small files).

Xiafs and ext2fs are both significantly faster than the previous minix
or extfs filesystems (the extfs in particularly would get terribly slow
with time).  Although tests to date have placed the ext2fs ahead of the
xiafs in terms of speed, the differences between them are not generally
as significant as the speedup when compared to the older fs's.  Ext2fs
seems to suffer less from long-term fragmentation.

Ext2fs is the standard enhanced filesystem for SLS; xiafs was adopted as
HJ's distribution filesystem for his base system and rootdisk releases.

Xiafs is pretty stable just now.  Extensions to ext2fs are still being
actively developed.


Limits:
=======

			ext2fs		xiafs
------------------------------------------------
Partition size		4GB (**)	4GB (**)
File size		4GB		64MB (*)
Filename		255		248  (*)
Inodes			2^31		2^31
Inode size		128 bytes	64 bytes

(*)  the xiafs file size limit will rise to 1GB once kernel support for
     larger block sizes is introduced.  The filename limit can be raised
     to 255 by changing the namelength in xia_fs.h to:

	#define  _XIAFS_NAME_LEN 255

(**) Partitions up to 2TB large may be supported in the future, and are
     compatible with the current filesystem formats.


ext2fs:
=======

Pros:
      *	Flexible, expandable.
      *	Fast.
      *	After a crash, lost files can often be automatically recovered
	(e2fsck will place them in /lost+found).
      *	Is the only filesystem to support a changeable filesize
        limit (through the standard kernel resource limit mechanism).
      *	Supports a "valid" flag which is set when the filesystem is
	cleanly unmounted, to automatically identify filesystems which
	may need repair after a crash.
Cons:
      *	Larger inode overhead (though still insignificant against other
	overheads).
      *	Some bugs in versions before 0.3.  No bugs known or reported in
	0.3, but these are early days yet...
Coming-soon:
      *	POSIX Access Control Lists, transparent compressed file support,
	fragments, large block sizes, undelete files, recovery from
	superblock corruption.


xiafs:
======
Pros:
      *	Designed from the start as a minimal but reliable enhancement to
	the robust minix fs, so there have been no bugs reported
	recently.
Cons:
      *	Not as much room for upgrade.
      *	Generally lower limits on filesize and name lengths. (But see
	note in the limits section above.)
Coming-soon:
      *	Large block sizes


FTP sites:
==========

The latest versions of the xiafs and ext2fs kernel code are both
present in the latest official Linux kernel distribution (0.99pl9)
available on all major Linux ftp sites.

The latest versions of the accompanying program code (the mkfs and
fsck programs) are available in:

xiafspgm-0.8.1.tar.z in:
  tsx-11.mit.edu:/pub/linux/BETA/xiafs
  sunsite.unc.edu:/pub/Linux/system/Filesystems/xiafs
  ftp.uu.net:/systems/unix/linux/BETA/xiafs
  nic.funet.fi:/pub/OS/Linux/BETA/xiafs
  src.doc.ic.ac.uk:/computing/operating-systems/Linux/funet-mirror/BETA/xiafs

e2fsprogs-0.3.tar.z in:
  tsx-11.mit.edu:/pub/linux/BETA/ext2fs
  sunsite.unc.edu:/pub/Linux/system/Filesystems/ext2
  ftp.uu.net:/systems/unix/linux/BETA/ext2fs
  nic.funet.fi:/pub/OS/Linux/BETA/ext2fs
  src.doc.ic.ac.uk:/computing/operating-systems/Linux/funet-mirror/BETA/ext2fs
  ftp.ibp.fr:/pub/linux/BETA/ext2fs


Contacts:
=========

Minix fs:	Linus Torvalds <torvalds@cs.helsinki.fi>
Extfs:		Remy Card <card@masi.ibp.fr>
Ext2fs:		Remy Card <card@masi.ibp.fr>,
		Stephen Tweedie <sct@dcs.ed.ac.uk>
Xiafs:		Q. Frank Xia <qx@math.columbia.edu>
