162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ciconfig XFS_FS
362306a36Sopenharmony_ci	tristate "XFS filesystem support"
462306a36Sopenharmony_ci	depends on BLOCK
562306a36Sopenharmony_ci	select EXPORTFS
662306a36Sopenharmony_ci	select LIBCRC32C
762306a36Sopenharmony_ci	select FS_IOMAP
862306a36Sopenharmony_ci	help
962306a36Sopenharmony_ci	  XFS is a high performance journaling filesystem which originated
1062306a36Sopenharmony_ci	  on the SGI IRIX platform.  It is completely multi-threaded, can
1162306a36Sopenharmony_ci	  support large files and large filesystems, extended attributes,
1262306a36Sopenharmony_ci	  variable block sizes, is extent based, and makes extensive use of
1362306a36Sopenharmony_ci	  Btrees (directories, extents, free space) to aid both performance
1462306a36Sopenharmony_ci	  and scalability.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	  Refer to the documentation at <http://oss.sgi.com/projects/xfs/>
1762306a36Sopenharmony_ci	  for complete details.  This implementation is on-disk compatible
1862306a36Sopenharmony_ci	  with the IRIX version of XFS.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci	  To compile this file system support as a module, choose M here: the
2162306a36Sopenharmony_ci	  module will be called xfs.  Be aware, however, that if the file
2262306a36Sopenharmony_ci	  system of your root partition is compiled as a module, you'll need
2362306a36Sopenharmony_ci	  to use an initial ramdisk (initrd) to boot.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciconfig XFS_SUPPORT_V4
2662306a36Sopenharmony_ci	bool "Support deprecated V4 (crc=0) format"
2762306a36Sopenharmony_ci	depends on XFS_FS
2862306a36Sopenharmony_ci	default y
2962306a36Sopenharmony_ci	help
3062306a36Sopenharmony_ci	  The V4 filesystem format lacks certain features that are supported
3162306a36Sopenharmony_ci	  by the V5 format, such as metadata checksumming, strengthened
3262306a36Sopenharmony_ci	  metadata verification, and the ability to store timestamps past the
3362306a36Sopenharmony_ci	  year 2038.  Because of this, the V4 format is deprecated.  All users
3462306a36Sopenharmony_ci	  should upgrade by backing up their files, reformatting, and restoring
3562306a36Sopenharmony_ci	  from the backup.
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci	  Administrators and users can detect a V4 filesystem by running
3862306a36Sopenharmony_ci	  xfs_info against a filesystem mountpoint and checking for a string
3962306a36Sopenharmony_ci	  beginning with "crc=".  If the string "crc=0" is found, the
4062306a36Sopenharmony_ci	  filesystem is a V4 filesystem.  If no such string is found, please
4162306a36Sopenharmony_ci	  upgrade xfsprogs to the latest version and try again.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci	  This option will become default N in September 2025.  Support for the
4462306a36Sopenharmony_ci	  V4 format will be removed entirely in September 2030.  Distributors
4562306a36Sopenharmony_ci	  can say N here to withdraw support earlier.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci	  To continue supporting the old V4 format (crc=0), say Y.
4862306a36Sopenharmony_ci	  To close off an attack surface, say N.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciconfig XFS_SUPPORT_ASCII_CI
5162306a36Sopenharmony_ci	bool "Support deprecated case-insensitive ascii (ascii-ci=1) format"
5262306a36Sopenharmony_ci	depends on XFS_FS
5362306a36Sopenharmony_ci	default y
5462306a36Sopenharmony_ci	help
5562306a36Sopenharmony_ci	  The ASCII case insensitivity filesystem feature only works correctly
5662306a36Sopenharmony_ci	  on systems that have been coerced into using ISO 8859-1, and it does
5762306a36Sopenharmony_ci	  not work on extended attributes.  The kernel has no visibility into
5862306a36Sopenharmony_ci	  the locale settings in userspace, so it corrupts UTF-8 names.
5962306a36Sopenharmony_ci	  Enabling this feature makes XFS vulnerable to mixed case sensitivity
6062306a36Sopenharmony_ci	  attacks.  Because of this, the feature is deprecated.  All users
6162306a36Sopenharmony_ci	  should upgrade by backing up their files, reformatting, and restoring
6262306a36Sopenharmony_ci	  from the backup.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci	  Administrators and users can detect such a filesystem by running
6562306a36Sopenharmony_ci	  xfs_info against a filesystem mountpoint and checking for a string
6662306a36Sopenharmony_ci	  beginning with "ascii-ci=".  If the string "ascii-ci=1" is found, the
6762306a36Sopenharmony_ci	  filesystem is a case-insensitive filesystem.  If no such string is
6862306a36Sopenharmony_ci	  found, please upgrade xfsprogs to the latest version and try again.
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci	  This option will become default N in September 2025.  Support for the
7162306a36Sopenharmony_ci	  feature will be removed entirely in September 2030.  Distributors
7262306a36Sopenharmony_ci	  can say N here to withdraw support earlier.
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci	  To continue supporting case-insensitivity (ascii-ci=1), say Y.
7562306a36Sopenharmony_ci	  To close off an attack surface, say N.
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciconfig XFS_QUOTA
7862306a36Sopenharmony_ci	bool "XFS Quota support"
7962306a36Sopenharmony_ci	depends on XFS_FS
8062306a36Sopenharmony_ci	select QUOTACTL
8162306a36Sopenharmony_ci	help
8262306a36Sopenharmony_ci	  If you say Y here, you will be able to set limits for disk usage on
8362306a36Sopenharmony_ci	  a per user and/or a per group basis under XFS.  XFS considers quota
8462306a36Sopenharmony_ci	  information as filesystem metadata and uses journaling to provide a
8562306a36Sopenharmony_ci	  higher level guarantee of consistency.  The on-disk data format for
8662306a36Sopenharmony_ci	  quota is also compatible with the IRIX version of XFS, allowing a
8762306a36Sopenharmony_ci	  filesystem to be migrated between Linux and IRIX without any need
8862306a36Sopenharmony_ci	  for conversion.
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci	  If unsure, say N.  More comprehensive documentation can be found in
9162306a36Sopenharmony_ci	  README.quota in the xfsprogs package.  XFS quota can be used either
9262306a36Sopenharmony_ci	  with or without the generic quota support enabled (CONFIG_QUOTA) -
9362306a36Sopenharmony_ci	  they are completely independent subsystems.
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ciconfig XFS_POSIX_ACL
9662306a36Sopenharmony_ci	bool "XFS POSIX ACL support"
9762306a36Sopenharmony_ci	depends on XFS_FS
9862306a36Sopenharmony_ci	select FS_POSIX_ACL
9962306a36Sopenharmony_ci	help
10062306a36Sopenharmony_ci	  POSIX Access Control Lists (ACLs) support permissions for users and
10162306a36Sopenharmony_ci	  groups beyond the owner/group/world scheme.
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci	  If you don't know what Access Control Lists are, say N.
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ciconfig XFS_RT
10662306a36Sopenharmony_ci	bool "XFS Realtime subvolume support"
10762306a36Sopenharmony_ci	depends on XFS_FS
10862306a36Sopenharmony_ci	help
10962306a36Sopenharmony_ci	  If you say Y here you will be able to mount and use XFS filesystems
11062306a36Sopenharmony_ci	  which contain a realtime subvolume.  The realtime subvolume is a
11162306a36Sopenharmony_ci	  separate area of disk space where only file data is stored.  It was
11262306a36Sopenharmony_ci	  originally designed to provide deterministic data rates suitable
11362306a36Sopenharmony_ci	  for media streaming applications, but is also useful as a generic
11462306a36Sopenharmony_ci	  mechanism for ensuring data and metadata/log I/Os are completely
11562306a36Sopenharmony_ci	  separated.  Regular file I/Os are isolated to a separate device
11662306a36Sopenharmony_ci	  from all other requests, and this can be done quite transparently
11762306a36Sopenharmony_ci	  to applications via the inherit-realtime directory inode flag.
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci	  See the xfs man page in section 5 for additional information.
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci	  If unsure, say N.
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ciconfig XFS_DRAIN_INTENTS
12462306a36Sopenharmony_ci	bool
12562306a36Sopenharmony_ci	select JUMP_LABEL if HAVE_ARCH_JUMP_LABEL
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ciconfig XFS_ONLINE_SCRUB
12862306a36Sopenharmony_ci	bool "XFS online metadata check support"
12962306a36Sopenharmony_ci	default n
13062306a36Sopenharmony_ci	depends on XFS_FS
13162306a36Sopenharmony_ci	depends on TMPFS && SHMEM
13262306a36Sopenharmony_ci	select XFS_DRAIN_INTENTS
13362306a36Sopenharmony_ci	help
13462306a36Sopenharmony_ci	  If you say Y here you will be able to check metadata on a
13562306a36Sopenharmony_ci	  mounted XFS filesystem.  This feature is intended to reduce
13662306a36Sopenharmony_ci	  filesystem downtime by supplementing xfs_repair.  The key
13762306a36Sopenharmony_ci	  advantage here is to look for problems proactively so that
13862306a36Sopenharmony_ci	  they can be dealt with in a controlled manner.
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci	  This feature is considered EXPERIMENTAL.  Use with caution!
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ci	  See the xfs_scrub man page in section 8 for additional information.
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci	  If unsure, say N.
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ciconfig XFS_ONLINE_SCRUB_STATS
14762306a36Sopenharmony_ci	bool "XFS online metadata check usage data collection"
14862306a36Sopenharmony_ci	default y
14962306a36Sopenharmony_ci	depends on XFS_ONLINE_SCRUB
15062306a36Sopenharmony_ci	select DEBUG_FS
15162306a36Sopenharmony_ci	help
15262306a36Sopenharmony_ci	  If you say Y here, the kernel will gather usage data about
15362306a36Sopenharmony_ci	  the online metadata check subsystem.  This includes the number
15462306a36Sopenharmony_ci	  of invocations, the outcomes, and the results of repairs, if any.
15562306a36Sopenharmony_ci	  This may slow down scrub slightly due to the use of high precision
15662306a36Sopenharmony_ci	  timers and the need to merge per-invocation information into the
15762306a36Sopenharmony_ci	  filesystem counters.
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci	  Usage data are collected in /sys/kernel/debug/xfs/scrub.
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ci	  If unsure, say N.
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ciconfig XFS_ONLINE_REPAIR
16462306a36Sopenharmony_ci	bool "XFS online metadata repair support"
16562306a36Sopenharmony_ci	default n
16662306a36Sopenharmony_ci	depends on XFS_FS && XFS_ONLINE_SCRUB
16762306a36Sopenharmony_ci	help
16862306a36Sopenharmony_ci	  If you say Y here you will be able to repair metadata on a
16962306a36Sopenharmony_ci	  mounted XFS filesystem.  This feature is intended to reduce
17062306a36Sopenharmony_ci	  filesystem downtime by fixing minor problems before they cause the
17162306a36Sopenharmony_ci	  filesystem to go down.  However, it requires that the filesystem be
17262306a36Sopenharmony_ci	  formatted with secondary metadata, such as reverse mappings and inode
17362306a36Sopenharmony_ci	  parent pointers.
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ci	  This feature is considered EXPERIMENTAL.  Use with caution!
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci	  See the xfs_scrub man page in section 8 for additional information.
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci	  If unsure, say N.
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ciconfig XFS_WARN
18262306a36Sopenharmony_ci	bool "XFS Verbose Warnings"
18362306a36Sopenharmony_ci	depends on XFS_FS && !XFS_DEBUG
18462306a36Sopenharmony_ci	help
18562306a36Sopenharmony_ci	  Say Y here to get an XFS build with many additional warnings.
18662306a36Sopenharmony_ci	  It converts ASSERT checks to WARN, so will log any out-of-bounds
18762306a36Sopenharmony_ci	  conditions that occur that would otherwise be missed. It is much
18862306a36Sopenharmony_ci	  lighter weight than XFS_DEBUG and does not modify algorithms and will
18962306a36Sopenharmony_ci	  not cause the kernel to panic on non-fatal errors.
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci	  However, similar to XFS_DEBUG, it is only advisable to use this if you
19262306a36Sopenharmony_ci	  are debugging a particular problem.
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ciconfig XFS_DEBUG
19562306a36Sopenharmony_ci	bool "XFS Debugging support"
19662306a36Sopenharmony_ci	depends on XFS_FS
19762306a36Sopenharmony_ci	help
19862306a36Sopenharmony_ci	  Say Y here to get an XFS build with many debugging features,
19962306a36Sopenharmony_ci	  including ASSERT checks, function wrappers around macros,
20062306a36Sopenharmony_ci	  and extra sanity-checking functions in various code paths.
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ci	  Note that the resulting code will be HUGE and SLOW, and probably
20362306a36Sopenharmony_ci	  not useful unless you are debugging a particular problem.
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci	  Say N unless you are an XFS developer, or you play one on TV.
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ciconfig XFS_ASSERT_FATAL
20862306a36Sopenharmony_ci	bool "XFS fatal asserts"
20962306a36Sopenharmony_ci	default y
21062306a36Sopenharmony_ci	depends on XFS_FS && XFS_DEBUG
21162306a36Sopenharmony_ci	help
21262306a36Sopenharmony_ci	  Set the default DEBUG mode ASSERT failure behavior.
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci	  Say Y here to cause DEBUG mode ASSERT failures to result in fatal
21562306a36Sopenharmony_ci	  errors that BUG() the kernel by default. If you say N, ASSERT failures
21662306a36Sopenharmony_ci	  result in warnings.
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci	  This behavior can be modified at runtime via sysfs.
219