fs/erofs: add big pcluster support

This enables EROFS big pcluster images for buildroot.

Signed-off-by: Gao Xiang <hsiangkao@aol.com>
[yann.morin.1998@free.fr: must be a multiple of 4KiB]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021.08.x
Gao Xiang 2021-07-14 22:55:28 +08:00 committed by Yann E. MORIN
parent 42bbabdda2
commit 90dfc0a596
2 changed files with 14 additions and 0 deletions

View File

@ -11,4 +11,14 @@ config BR2_TARGET_ROOTFS_EROFS_LZ4HC
help
Use lz4 high-compression to compress data in the filesystem.
config BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE
int "pcluster size"
default 0
help
Specify the maximum size of physical cluster in bytes, as a
multiple of 4KiB, for the big pcluster feature in order to
get much better compression ratios (thus better sequential
read performance for common storage devices), which has been
introduced since Linux 5.13.
endif # BR2_TARGET_ROOTFS_EROFS

View File

@ -10,6 +10,10 @@ ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZ4HC),y)
ROOTFS_EROFS_ARGS += -zlz4hc
endif
ifneq ($(BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE),0)
ROOTFS_EROFS_ARGS += -C$(strip $(BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE))
endif
define ROOTFS_EROFS_CMD
$(HOST_DIR)/bin/mkfs.erofs $(ROOTFS_EROFS_ARGS) $@ $(TARGET_DIR)
endef