From: Grzegorz Blach Date: Sat, 3 Nov 2018 14:27:27 +0000 (+0100) Subject: fs/f2fs: add option to define overprovision ratio X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d27baa16a3ec67f454a6b558dd3d9925f763f0a;p=buildroot.git fs/f2fs: add option to define overprovision ratio Signed-off-by: Grzegorz Blach [Thomas: split from the initial patch from Grzegorz, reworded Config.in help text] Signed-off-by: Thomas Petazzoni --- diff --git a/fs/f2fs/Config.in b/fs/f2fs/Config.in index ca838096d9..71101d2b57 100644 --- a/fs/f2fs/Config.in +++ b/fs/f2fs/Config.in @@ -25,4 +25,15 @@ config BR2_TARGET_ROOTFS_F2FS_COLD_FILES cold files. The default list includes most of multimedia 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 diff --git a/fs/f2fs/f2fs.mk b/fs/f2fs/f2fs.mk index 6025aad4bb..cf79779d2e 100644 --- a/fs/f2fs/f2fs.mk +++ b/fs/f2fs/f2fs.mk @@ -15,10 +15,15 @@ F2FS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL)) # ") 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 = \ -f \ -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