ArticleslgStudy

computer science

XFS

XFS is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand XFS rather than just read about it. In short: XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3.

XFS — main illustration
XFS — illustration

Key takeaways

  • XFS belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect XFS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of XFS from memory before moving on to harder problems.

Reference excerpt

XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3. XFS was ported to the Linux kernel in 2001; as of June 2014, XFS is supported by most Linux distributions. Red Hat Enterprise Linux uses it as its default file system. XFS excels in the execution of parallel input/output (I/O) operations due to its design, which is based on allocation groups (a type of subdivision of the physical volumes in which XFS is used – also shortened to AGs). Because of this, XFS enables extreme scalability of I/O threads, file system bandwidth, and size of files and of the file system itself when spanning multiple physical storage devices. XFS ensures the consistency of data by employing metadata journaling and supporting write barriers. Space allocation is performed via extents with data structures stored in B+ trees, improving the overall performance of the file system, especially when handling large files. Delayed allocation assists in the prevention of file system fragmentation; online defragmentation is also supported.

History Silicon Graphics began development of XFS ("X" was meant to be filled in later but never was) in 1993 for its UNIX System V based IRIX operating system. The file system was released under the GNU General Public License (GPL) in May 1999. A team led by Steve Lord at SGI ported XFS to Linux, and first support by a Linux distribution came in 2001. This support gradually became available in almost all Linux distributions. Initial support for XFS in the Linux kernel came through patches from SGI. It merged into the Linux kernel mainline for the 2.6 series, and separately merged in February 2004 into the 2.4 series in version 2.4.25, making XFS almost universally available on Linux systems. Gentoo Linux became the first Linux distribution to introduce an option for XFS as the default filesystem in mid-2002. FreeBSD added read-only support for XFS in December 2005, and in June 2006 introduced experimental write support. However, this was intended only as an aid in migration from Linux, not as a "main" file system. FreeBSD 10 removed support for XFS. In 2009, version 5.4 of 64-bit Red Hat Enterprise Linux (RHEL) Linux distribution contained the necessary kernel support for the creation and usage of XFS file systems, but lacked the corresponding command-line tools. The tools available from CentOS could operate for that purpose, and Red Hat also provided them to RHEL customers on request. RHEL 6.0, released in 2010, includes XFS support for a fee as part of Red Hat's "scalable file system add-on". Oracle Linux 6, released in 2011, also includes an option for using XFS. RHEL 7.0, released in June 2014, uses XFS as its default file system, including support for using XFS for the /boot partition, which previously was not practical due to bugs in the GRUB bootloader.

Linux kernel 4.8 in August 2016 added a new feature, "reverse mapping". This is the foundation for a large set of planned features: snapshots, copy-on-write (COW) data, data deduplication, reflink copies, online data and metadata scrubbing, highly accurate reporting of data loss or bad sectors, and significantly improved reconstruction of damaged or corrupted filesystems. This work required changes to XFS's on-disk format. Linux kernel 5.10, released in December 2020, included the new on-disk format XFS v5. This was a hard break, since the deprecated XFS v4 can not be converted to XFS v5. Data on partitions formatted with XFS v4 has to be backed up to another partition or media in order to restore it after formatting the old partition with XFS v5, which completely wipes all data on it. The support for XFS v4 will be removed from the Linux kernel in September 2030. XFS v5 introduced "bigtime", to store inode timestamps as a 64-bit nanosecond counter instead of the traditional 32-bit seconds counter. This postpones the previous Year 2038 problem until the year 2486. It also introduced metadata checksums. The Gentoo Handbook, Gentoo Linux's official installation manual, has recommended XFS as the "all-purpose all-platform filesystem" since June 28, 2023, succeeding Ext4.

Features

Capacity XFS is a 64-bit file system and supports a maximum file system size of 8 exbibytes minus one byte (263 − 1 bytes), but limitations imposed by the host operating system can decrease this limit. 32-bit Linux systems limit the size of both the file and file system to 16 tebibytes.

Journaling

In modern computing, journaling is a capability which ensures consistency of data in the file system, despite any power outages or system crash that may occur. XFS provides journaling for file system metadata, where file system updates are first written to a serial journal before the actual disk blocks are updated. The journal is a circular buffer of disk blocks that is not read in normal file system operation. The XFS journal can be stored within the data section of the file system (as an internal log), or on a separate device to minimize disk contention. In XFS, the journal primarily contains entries that describe the portions of the disk blocks changed by filesystem operations. Journal updates are performed asynchronously to avoid a decrease in performance speed. In the event of a system crash, file system operations which occurred immediately prior to the crash can be reapplied and completed as recorded in the journal, which is how data stored in XFS file systems remain consistent. Recovery is performed automatically the first time the file system is mounted after the crash. The speed of recovery is independent of the size of the file system, instead depending on the amount of file system operations to be reapplied.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with XFS

Start with the simplest possible case. Write down what XFS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to XFS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about XFS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of XFS

In research
XFS appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses XFS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
XFS is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1994 software, Computer-related introductions in 1994, Disk file systems, so understanding it makes those chapters shorter.
In everyday life
Look for XFS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “XFS” →

How to study XFS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what XFS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain XFS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is XFS in simple terms?

XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3.

Why does XFS matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study XFS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on XFS.

Tags

  • 1994 software
  • Computer-related introductions in 1994
  • Disk file systems
  • File systems supported by the Linux kernel
  • Formerly proprietary software
  • IRIX

Keep exploring