aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGravatar Grzegorz Blach <grzegorz@blach.pl>2018-11-03 15:27:27 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-03 15:28:00 +0100
commit0d27baa16a3ec67f454a6b558dd3d9925f763f0a (patch)
tree3c7ba4703d434c1d975bef7547b1f4b88a6b5f55 /fs
parent0446f34d97c1098a95bcb90eb6167033932ec831 (diff)
downloadbuildroot-0d27baa16a3ec67f454a6b558dd3d9925f763f0a.tar.gz
buildroot-0d27baa16a3ec67f454a6b558dd3d9925f763f0a.tar.bz2
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/Config.in11
-rw-r--r--fs/f2fs/f2fs.mk7
2 files changed, 17 insertions, 1 deletions
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