fs/f2fs: add option to define overprovision ratio

Signed-off-by: Grzegorz Blach <grzegorz@blach.pl>
[Thomas: split from the initial patch from Grzegorz, reworded
Config.in help text]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Grzegorz Blach 2018-11-03 15:27:27 +01:00 committed by Thomas Petazzoni
parent 0446f34d97
commit 0d27baa16a
2 changed files with 17 additions and 1 deletions

View File

@ -25,4 +25,15 @@ config BR2_TARGET_ROOTFS_F2FS_COLD_FILES
cold files. The default list includes most of multimedia cold files. The default list includes most of multimedia
file extensions such as jpg, gif, mpeg, mkv, and so on. file extensions such as jpg, gif, mpeg, mkv, and so on.
config BR2_TARGET_ROOTFS_F2FS_OVERPROVISION
int "overprovision ratio"
default 0
help
The percentage over the volume size for overprovision
area. This area is hidden to users, and utilized by F2FS
cleaner.
Leave at 0 to use the default overprovision ratio of
mkfs.f2fs.
endif # BR2_TARGET_ROOTFS_F2FS endif # BR2_TARGET_ROOTFS_F2FS

View File

@ -15,10 +15,15 @@ F2FS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL))
# ") # ")
F2FS_COLD_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_COLD_FILES)) F2FS_COLD_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_COLD_FILES))
ifneq ($(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION),0)
F2FS_OVERPROVISION = $(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION)
endif
F2FS_OPTS = \ F2FS_OPTS = \
-f \ -f \
-l "$(F2FS_LABEL)" \ -l "$(F2FS_LABEL)" \
$(if $(F2FS_COLD_FILES),-e "$(F2FS_COLD_FILES)") $(if $(F2FS_COLD_FILES),-e "$(F2FS_COLD_FILES)") \
$(if $(F2FS_OVERPROVISION),-o $(F2FS_OVERPROVISION))
ROOTFS_F2FS_DEPENDENCIES = host-f2fs-tools ROOTFS_F2FS_DEPENDENCIES = host-f2fs-tools