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.
48-481: Data Management API ( DMAPI ) is the interface defined in the X/Open document "Systems Management: Data Storage Management (XDSM) API" dated February 1997. XFS , IBM JFS , VxFS , AdvFS , StorNext and IBM Spectrum Scale file systems support DMAPI for Hierarchical Storage Management (HSM). This computer-storage -related article is a stub . You can help Misplaced Pages by expanding it . XFS XFS excels in
96-405: A signed 32-bit integer , a data type composed of 32 binary digits (bits) which represent an integer value, with 'signed' meaning that the number can represent both positive and negative numbers, as well as zero; and is usually stored in two's complement format. Thus, a signed 32-bit integer can only represent integer values from −(2 ) to 2 − 1 inclusive. Consequently, if
144-405: 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 28 Jun 2023, succeeding Ext4 . XFS is a 64-bit file system and supports
192-637: A component. It is conceivable that some of these systems may still be in use in 2038. It may be impractical or, in some cases, impossible to upgrade the software running these systems, ultimately requiring replacement if the 32-bit limitations are to be corrected. Many transportation systems from flight to automobiles use embedded systems extensively. In automotive systems, this may include anti-lock braking system (ABS), electronic stability control (ESC/ESP), traction control (TCS) and automatic four-wheel drive ; aircraft may use inertial guidance systems and GPS receivers . Another major use of embedded systems
240-454: 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
288-419: A direct I/O implementation that allows non-cached I/O operations to be applied directly to the userspace. Data is transferred between the buffer of the application and the disk using DMA , which allows access to the full I/O bandwidth of the underlying disk devices. XFS does not yet provide direct support for snapshots, as it currently expects the snapshot process to be implemented by the volume manager. Taking
336-580: 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
384-506: A maximum file system size of 8 exbibytes minus one byte (2 − 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 . 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
432-438: A minimum range of 292,000 years at microsecond resolution. In particular, Java's and JavaScript's use of 64-bit signed integers to represent absolute timestamps as "milliseconds since 1 January 1970" will work correctly for the next 292 million years . Other proposals for new time representations provide different precisions, ranges, and sizes (almost always wider than 32 bits), as well as solving other related problems, such as
480-402: A number of name/value pairs attached to a file. Names are nul-terminated printable character strings which are up to 256 bytes in length, while their associated values can contain up to 64 KB of binary data. They are further subdivided into two namespaces: root and user . Extended attributes stored in the root namespace can be modified only by the superuser, while attributes in
528-490: 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
SECTION 10
#1732793772836576-410: A signed 32-bit integer is used to store Unix time, the latest time that can be stored is 2 − 1 (2,147,483,647) seconds after epoch, which is 03:14:07 on Tuesday, 19 January 2038. Systems that attempt to increment this value by one more second to 2 seconds after epoch (03:14:08) will suffer integer overflow , inadvertently flipping the sign bit to indicate a negative number. This changes
624-468: A small block size would typically maximize capacity, but for a system dealing mainly with large files, a larger block size can provide a performance efficiency advantage. XFS makes use of lazy evaluation techniques for file allocation. When a file is written to the buffer cache, rather than allocating extents for the data, XFS simply reserves the appropriate number of file system blocks for the data held in memory. The actual block allocation occurs only when
672-613: A snapshot of an XFS filesystem involves temporarily halting I/O to the filesystem using the xfs_freeze utility, having the volume manager perform the actual snapshot, and then resuming I/O to continue with normal operations. The snapshot can then be mounted read-only for backup purposes. Releases of XFS in IRIX incorporated an integrated volume manager called XLV. This volume manager has not been ported to Linux, and XFS works with standard LVM in Linux systems instead. In recent Linux kernels,
720-510: Is in communications devices, including cell phones and Internet-enabled appliances (e.g. routers , wireless access points , IP cameras ) which rely on storing an accurate time and date and are increasingly based on Unix-like operating systems. For example, the Y2038 problem makes some devices running 32-bit Android crash and not restart when the time is changed to that date. However, this does not imply that all embedded systems will suffer from
768-417: Is limited by the fact that tm_year uses a signed 32-bit integer value starting at 1900 for the year. This limits the year to a maximum of 2,147,485,547 (2,147,483,647 + 1900). Alternative proposals have been made (some of which are already in use), such as storing either milliseconds or microseconds since an epoch (typically either 1 January 1970 or 1 January 2000) in a signed 64-bit integer, providing
816-666: Is no universal solution for the Year 2038 problem. For example, in the C language , any change to the definition of the time_t data type would result in code-compatibility problems in any application in which date and time representations are dependent on the nature of the signed 32-bit time_t integer. Changing time_t to an unsigned 32-bit integer, which would extend the range to 2106 (specifically, 06:28:15 UTC on Sunday, 7 February 2106), would adversely affect programs that store, retrieve, or manipulate dates prior to 1970, as such dates are represented by negative numbers. Increasing
864-472: 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
912-427: Is to be created on a striped RAID array, a stripe unit can be specified when the file system is created. This maximizes throughput by ensuring that data allocations, inode allocations and the internal log (the journal) are aligned with the stripe unit. Blocks used in files stored on XFS file systems are managed with variable length extents where one extent describes one or more contiguous blocks. This can shorten
960-463: Is virtually impossible to derive, but there are well-known data structures that have the Unix time problem: Embedded systems that use dates for either computation or diagnostic logging are most likely to be affected by the Y2038 problem. Despite the modern 18–24 month generational update in computer systems technology , embedded systems are designed to last the lifetime of the machine in which they are
1008-523: The xfs_freeze functionality is implemented in the VFS layer, and is executed automatically when the Volume Manager's snapshot functionality is invoked. This was once a valuable advantage as the ext3 file system could not be suspended and the volume manager was unable to create a consistent "hot" snapshot to back up a heavily busy database. Fortunately this is no longer the case. Since Linux 2.6.29,
SECTION 20
#17327937728361056-509: The xfs_growfs utility to perform online expansion of XFS file systems. XFS filesystems can be grown so long as there is remaining unallocated space on the device holding the filesystem. This feature is typically used in conjunction with volume management, as otherwise the partition holding the filesystem will need enlarging separately. XFS implemented the DMAPI interface to support Hierarchical Storage Management in IRIX. As of October 2010,
1104-479: The Unix epoch (00:00:00 UTC on 1 January 1970)—and store it in a signed 32-bit integer . The data type is only capable of representing integers between −(2 ) and 2 − 1 , meaning the latest time that can be properly encoded is 2 − 1 seconds after epoch (03:14:07 UTC on 19 January 2038). Attempting to increment to the following second (03:14:08) will cause
1152-641: The integer to overflow , setting its value to −(2 ) which systems will interpret as 2 seconds before epoch (20:45:52 UTC on 13 December 1901). The problem is similar in nature to the year 2000 problem , the difference being the Year 2000 problem had to do with base 10 numbers , whereas the Year 2038 problem involves base 2 numbers . Analogous storage constraints will be reached in 2106 , where systems storing Unix time as an unsigned (rather than signed) 32-bit integer will overflow on 7 February 2106 at 06:28:15 UTC. Computer systems that use time for critical computations may encounter fatal errors if
1200-404: The 2038 cutoff date is 01:27:28 UTC on 13 May 2006, so requests sent after this time would result in a time-out date which is beyond the cutoff. This made time-out calculations overflow and return dates that were actually in the past, causing software to crash. When the problem was discovered, AOLServer operators had to edit the configuration file and set the time-out to a lower value. There
1248-513: The Linux implementation of XFS supported the required on-disk metadata for DMAPI implementation, but the kernel support was reportedly not usable. For some time, SGI hosted a kernel tree which included the DMAPI hooks, but this support has not been adequately maintained, although kernel developers have stated an intention to bring this support up to date. The XFS guaranteed-rate I/O system provides an API that allows applications to reserve bandwidth to
1296-615: 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
1344-481: The Y2038 problem in the AOLserver software. The software was designed with a kludge to handle a database request that should "never" time out. Rather than specifically handling this special case, the initial design simply specified an arbitrary time-out date in the future with a default configuration specifying that requests should time out after a maximum of one billion seconds. However, one billion seconds before
1392-445: The Y2038 problem, since many such systems do not require access to dates. For those that do, those systems which only track the difference between times/dates and not absolute times/dates will, by the nature of the calculation, not experience a major problem. This is the case for automotive diagnostics based on legislated standards such as CARB ( California Air Resources Board ). In May 2006, reports surfaced of an early manifestation of
1440-491: 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. Silicon Graphics began development of XFS ("X"
1488-410: The data is finally flushed to disk. This improves the chance that the file will be written in a contiguous group of blocks, reducing fragmentation problems and increasing performance. XFS provides a 64-bit sparse address space for each file, which allows both for very large file sizes, and for "holes" within files in which no disk space is allocated. As the file system uses an extent map for each file,
DMAPI - Misplaced Pages Continue
1536-411: The estimated age of the universe . Many computer systems measure time and date using Unix time , an international standard for digital timekeeping. Unix time is defined as the number of seconds elapsed since 00:00:00 UTC on 1 January 1970 (an arbitrarily chosen time based on the creation of the first Unix system ), which has been dubbed the Unix epoch . Unix time has historically been encoded as
1584-406: 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
1632-406: The file allocation map size is kept small. Where the size of the allocation map is too large for it to be stored within the inode, the map is moved into a B+ tree which allows for rapid access to data anywhere in the 64-bit address space provided for the file. XFS provides multiple data streams for files; this is made possible by its implementation of extended attributes . These allow the storage of
1680-454: The file system, instead depending on the amount of file system operations to be reapplied. XFS file systems are internally partitioned into allocation groups , which are equally sized linear regions within the file system. Files and directories can span allocation groups. Each allocation group manages its own inodes and free space separately, providing scalability and parallelism so multiple threads and processes can perform I/O operations on
1728-436: The file systems ext3, ext4 , GFS2 and JFS have the freeze feature as well. Although the extent-based nature of XFS and the delayed allocation strategy it uses significantly improves the file system's resistance to fragmentation problems, XFS provides a filesystem defragmentation utility ( xfs_fsr , short for XFS filesystem reorganizer) that can defragment the files on a mounted and active XFS filesystem. XFS provides
1776-402: The filesystem. XFS dynamically calculates the performance available from the underlying storage devices, and will reserve bandwidth sufficient to meet the requested performance for a specified time. This is a feature unique to the XFS file system. Guaranteed rates can be "hard" or "soft", representing a trade off between reliability and performance; however, XFS will only allow "hard" guarantees if
1824-522: The integer value to −(2 ), or 2 seconds before epoch rather than after , which systems will interpret as 20:45:52 on Friday, 13 December 1901. From here, systems will continue to count up, toward zero, and then up through the positive integers again. As many computer systems use time computations to run critical functions, the bug may introduce serious problems. Any system using data structures with signed 32-bit time representations has an inherent risk of failing. A full list of these data structures
1872-467: The list of blocks considerably, compared to file systems that list all blocks used by a file individually. Block-oriented file systems manage space allocation with one or more block-oriented bitmaps; in XFS, these structures are replaced with an extent oriented structure consisting of a pair of B+ trees for each file system allocation group. One of the B+ trees is indexed by the length of the free extents, while
1920-512: 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
1968-454: The other is indexed by the starting block of the free extents. This dual indexing scheme allows for the highly efficient allocation of free extents for file system operations. The file system block size represents the minimum allocation unit. XFS allows file systems to be created with block sizes ranging between 512 bytes and 64 KB, allowing the file system to be tuned for the expected degree of usage. When many small files are expected,
DMAPI - Misplaced Pages Continue
2016-433: The same file system simultaneously. This architecture helps to optimize parallel I/O performance on systems with multiple processors and/or cores, as metadata updates can also be parallelized. The internal partitioning provided by allocation groups can be especially beneficial when the file system spans multiple physical devices, allowing optimal usage of throughput of the underlying storage components. If an XFS file system
2064-502: The size of the time_t type to 64 bits in an existing system would cause incompatible changes to the layout of structures and the binary interface of functions. Most operating systems designed to run on 64-bit hardware already use signed 64-bit time_t integers. Using a signed 64-bit value introduces a new wraparound date that is over twenty times greater than the estimated age of the universe : approximately 292 billion years from now. The ability to make computations on dates
2112-659: The underlying storage subsystem supports it. This facility is used mostly for real-time applications, such as video streaming. Guaranteed-rate I/O was only supported under IRIX , and required special hardware for that purpose. Year 2038 problem The year 2038 problem (also known as Y2038 , Y2K38 , Y2K38 superbug or the Epochalypse ) is a time computing problem that leaves some computer systems unable to represent times after 03:14:07 UTC on 19 January 2038. The problem exists in systems which measure Unix time —the number of seconds elapsed since
2160-566: The user namespace can be modified by any user with permission to write to the file. Extended attributes can be attached to any kind of XFS inode, including symbolic links, device nodes, directories, etc. The attr utility can be used to manipulate extended attributes from the command line, and the xfsdump and xfsrestore utilities are aware of extended attributes, and will back up and restore their contents. Many other backup systems do not support working with extended attributes. For applications requiring high throughput to disk, XFS provides
2208-441: The year 2038 problem is not addressed. Some applications that use future dates have already encountered the bug. The most vulnerable systems are those which are infrequently or never updated, such as legacy and embedded systems . Modern systems and software updates to legacy systems address this problem by using signed 64-bit integers instead of 32-bit integers, which will take 292 billion years to overflow—approximately 21 times
2256-526: 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
2304-544: 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
#835164