# SPDX-License-Identifier: GPL-2.0-only

config AMLOGIC_EROFS
	tristate "AMLOGIC EROFS filesystem support"
	depends on BLOCK
	select FS_IOMAP
	select LIBCRC32C
	help
	  Amlogic EROFS is amlogic self modified EROFS to get decompression
	  support by AMFC hardware to accelerate decompression speed. Most
	  content of this driver is copy from EROFS

	  If unsure, say N.

config AMLOGIC_EROFS_DEBUG
	bool "AMLOGIC EROFS debugging feature"
	depends on AMLOGIC_EROFS
	help
	  Print debugging messages and enable more BUG_ONs which check
	  filesystem consistency and find potential issues aggressively,
	  which can be used for Android eng build, for example.

	  For daily use, say N.

config AMLOGIC_EROFS_XATTR
	bool "AMLOGIC EROFS extended attributes"
	depends on AMLOGIC_EROFS
	default y
	help
	  Extended attributes are name:value pairs associated with inodes by
	  the kernel or by users (see the attr(5) manual page, or visit
	  <http://acl.bestbits.at/> for details).

	  If unsure, say N.

config AMLOGIC_EROFS_POSIX_ACL
	bool "AMLOGIC EROFS Access Control Lists"
	depends on AMLOGIC_EROFS_XATTR
	select FS_POSIX_ACL
	default y
	help
	  Posix Access Control Lists (ACLs) support permissions for users and
	  groups beyond the owner/group/world scheme.

	  To learn more about Access Control Lists, visit the POSIX ACLs for
	  Linux website <http://acl.bestbits.at/>.

	  If you don't know what Access Control Lists are, say N.

config AMLOGIC_EROFS_SECURITY
	bool "AMLOGIC EROFS Security Labels"
	depends on AMLOGIC_EROFS_XATTR
	default y
	help
	  Security labels provide an access control facility to support Linux
	  Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
	  Linux. This option enables an extended attribute handler for file
	  security labels in the erofs filesystem, so that it requires enabling
	  the extended attribute support in advance.

	  If you are not using a security module, say N.

config AMLOGIC_EROFS_ZIP
	bool "AMLOGIC EROFS Data Compression Support"
	depends on AMLOGIC_EROFS
	select LZ4_DECOMPRESS
	default y
	help
	  Enable fixed-sized output compression for AMLOGIC EROFS.

	  If you don't want to enable compression feature, say N.

config AMLOGIC_EROFS_ZIP_LZMA
	bool "AMLOGIC EROFS LZMA compressed data support"
	depends on AMLOGIC_EROFS_ZIP
	select XZ_DEC
	select XZ_DEC_MICROLZMA
	help
	  Saying Y here includes support for reading AMLOGIC EROFS file systems
	  containing LZMA compressed data, specifically called microLZMA. it
	  gives better compression ratios than the LZ4 algorithm, at the
	  expense of more CPU overhead.

	  LZMA support is an experimental feature for now and so most file
	  systems will be readable without selecting this option.

	  If unsure, say N.

config AMLOGIC_EROFS_PCPU_KTHREAD
	bool "AMLOGIC EROFS per-cpu decompression kthread workers"
	depends on AMLOGIC_EROFS_ZIP
	help
	  Saying Y here enables per-CPU kthread workers pool to carry out
	  async decompression for low latencies on some architectures.

	  If unsure, say N.

config AMLOGIC_EROFS_PCPU_KTHREAD_HIPRI
	bool "AMLOGIC EROFS high priority per-CPU kthread workers"
	depends on AMLOGIC_EROFS_ZIP && AMLOGIC_EROFS_PCPU_KTHREAD
	help
	  This permits AMLOGIC EROFS to configure per-CPU kthread workers to run
	  at higher priority.

	  If unsure, say N.

config AMLOGIC_EROFS_CRYPTO_MAX_PAGES
	int "AMLOGIC EROFS max distance pages for crypto usage"
	default 32
	help
	  This config defines max distance pages for crypto. Crypto layer
	  will use this value to grow up PCP buffers.
	  Default value is 128KB(32 pages).
	  You can change it to your value.
